diff options
| author | 8cy <[email protected]> | 2020-07-27 19:45:56 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-07-27 19:45:56 -0700 |
| commit | 350d89a259386b73b30a09ca9c04faf647216107 (patch) | |
| tree | 3dc1f6fee7701e949b822b9628ca4d1424764115 /server/src/utils/Utils.ts | |
| parent | improv: bold wc/ gb msg (diff) | |
| download | dep-core-test-music.tar.xz dep-core-test-music.zip | |
yeatest-music
Diffstat (limited to 'server/src/utils/Utils.ts')
| -rw-r--r-- | server/src/utils/Utils.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/server/src/utils/Utils.ts b/server/src/utils/Utils.ts index 454840e..e7972c2 100644 --- a/server/src/utils/Utils.ts +++ b/server/src/utils/Utils.ts @@ -2,4 +2,16 @@ export default class Util { static shorten(text: string, maxLen = 2000) { return text.length > maxLen ? `${text.substr(0, maxLen - 3)}...` : text; } + + static canModifyQueue(member) { + const { channel } = member.voice; + const botChannel = member.guild.me.voice.channel; + + if (channel !== botChannel) { + member.send('You need to join the voice channel first!'); // error + return false; + } + + return false; + } }
\ No newline at end of file |