Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
Bots-Discord
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Skyler Mäntysaari
Bots-Discord
Commits
e0df4bf6
Commit
e0df4bf6
authored
Jul 25, 2018
by
Sami
Browse files
Options
Downloads
Patches
Plain Diff
Music: Fixed the checks that prevented usage of stop command.
parent
11a7fb22
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Music-bot/cogs/utils/checks.py
+8
-14
8 additions, 14 deletions
Music-bot/cogs/utils/checks.py
with
8 additions
and
14 deletions
Music-bot/cogs/utils/checks.py
+
8
−
14
View file @
e0df4bf6
...
...
@@ -124,18 +124,12 @@ def song_requester_or_owner_or_dj():
def
music_stop_check
():
async
def
predicate
(
ctx
):
is_owner
=
await
ctx
.
bot
.
is_owner
(
ctx
.
author
)
try
:
vc
=
ctx
.
voice_client
if
ctx
.
message
.
author
.
name
==
vc
.
source
.
requester
.
name
:
return
True
elif
is_owner
:
if
is_owner
:
return
True
elif
discord
.
utils
.
get
(
ctx
.
message
.
author
.
roles
,
name
=
"
DJ
"
):
return
True
elif
ctx
.
message
.
author
!=
vc
.
source
.
requester
or
not
discord
.
utils
.
get
(
ctx
.
message
.
author
.
roles
,
name
=
"
DJ
"
):
await
ctx
.
send
(
f
"
You lack the permissions to use this command, sorry.
"
)
return
False
except
AttributeError
:
pass
return
commands
.
check
(
predicate
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment