-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
117 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
worker: npm run start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
}) | ||
] | ||
}) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters