Skip to content

Commit

Permalink
Merge branch 'prod' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
rastiqdev authored Feb 20, 2022
2 parents c33b468 + d12b8de commit 48d55a7
Show file tree
Hide file tree
Showing 7 changed files with 117 additions and 20 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/heroku.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Heroku CI

on:
push:
branches: [prod]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.10.0]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- uses: akhileshns/[email protected] # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_APIKEY}}
heroku_app_name: "astralbot-prod" #Must be unique in Heroku
heroku_email: ${{secrets.HEROKU_EMAIL}}
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
worker: npm run start
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"ffmpeg-static": "^4.4.0",
"googleapis": "^95.0.0",
"hypixel": "^1.0.3",
"jimp": "^0.16.1",
"jimp": "^0.3.11",
"math-expression-evaluator": "^1.3.8",
"mongodb": "^4.1.4",
"ms": "^2.1.3",
Expand All @@ -48,5 +48,8 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"prettier": "^2.5.1"
},
"engines": {
"node": "16.10.0"
}
}
38 changes: 20 additions & 18 deletions res/config.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
{
"suggestionChannelId": "906186926208479273",
"verifChannelId": "906141002505535539",
"rolePannelChannelId": "906274132679860244",
"ticketChannelId": "911555243127472148",
"mainGuildId": "906119156334743582",
"welcomeChannelId": "906925355061895168",
"countingChannelId": "906842382048329778",
"ticketCategoryId": "911956726192963635",
"subCounterChannelId": "916452122017558588",
"viewsCounterChannelId": "916452429057388544",
"suggestionChannelId": "923554380798623804",
"verifChannelId": "923510741666000896",
"rolePannelChannelId": "853324293391122442",
"ticketChannelId": "900415812890943488",
"mainGuildId": "852223829840625744",
"welcomeChannelId": "903577017969180672",
"countingChannelId": "923532929664167946",
"ticketCategoryId": "923515285259038760",
"subCounterChannelId": "923509342454575134",
"viewsCounterChannelId": "923509400646320148",
"astralYoutubeChannelId": "UCCJmvsUsf0Pnst0IzbARSBg",
"logs": {
"messagesChannelId": "909860870216093698",
"modChannelId": "909860895918809129",
"vocalChannelId": "909860912389845012",
"joinsChannelId": "909860923123044412",
"ticketsChannelId": "909860958753669201",
"botChannelId": "909860969398829116"
"messagesChannelId": "852937143675519008",
"modChannelId": "852937143675519008",
"vocalChannelId": "852937143675519008",
"joinsChannelId": "852937143675519008",
"ticketsChannelId": "852937143675519008",
"botChannelId": "852937143675519008"
},
"mods": {
"roles": [
"914460676167200778"
"853176148853653514",
"853334305149550623"
],
"user": []
},
"admins": {
"roles": [
"906124337415864360"
"867865612189696053",
"852224358381518850"
],
"user": []
},
Expand Down
2 changes: 1 addition & 1 deletion src/events/interactionCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ module.exports = {
});
}
} else if (interaction.customId === "selectsetup_validation") {
await interaction.member.roles.add("906149050510876674");
await interaction.member.roles.add("852939971820388357");
await interaction.deferUpdate();
} else if (
interaction.customId === "upvote" ||
Expand Down
60 changes: 60 additions & 0 deletions src/events/voiceStateUpdate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
const {MessageEmbed} = require("discord.js");
module.exports = {
name: "voiceStateUpdate",
async execute(client, old, new_) {
if (new_.member.user.bot) return

const logsChannel = await (
await client.guilds.fetch(client.config.mainGuildId)).channels.fetch(client.config.logs.vocalChannelId)

if (!old.channel && new_.channel) {
await logsChannel.send({
embeds: [
new MessageEmbed({
author: {
name: "Un membre a rejoint un salon vocal"
},
fields: [
{
name: "Utilisateur :",
value: `${new_.member.user.tag} (${new_.member.user.id})`,
inline: true
},
{
name: "Salon :",
value: `<#${new_.channelId}> (${new_.channelId})`,
inline: true
}
],
timestamp: Date.now(),
color: "#0099ff"
})
]
})
} else if (old.channel && !new_.channel) {
await logsChannel.send({
embeds: [
new MessageEmbed({
author: {
name: "Un membre a quitté un salon vocal"
},
fields: [
{
name: "Utilisateur :",
value: `${new_.member.user.tag} (${new_.member.user.id})`,
inline: true
},
{
name: "Salon :",
value: `<#${old.channelId}> (${old.channelId})`,
inline: true
}
],
timestamp: Date.now(),
color: "#ff1500"
})
]
})
}
}
}
8 changes: 8 additions & 0 deletions src/functions/createTicket.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ module.exports = async function (interaction) {
Permissions.FLAGS.READ_MESSAGE_HISTORY,
],
},
{
id: interaction.guild.roles.everyone,
deny: [
Permissions.FLAGS.SEND_MESSAGES,
Permissions.FLAGS.VIEW_CHANNEL,
Permissions.FLAGS.READ_MESSAGE_HISTORY,
],
}
],
}
);
Expand Down

0 comments on commit 48d55a7

Please sign in to comment.