mirror of
https://github.com/osmarks/autobotrobot
synced 2025-02-07 12:40:00 +00:00
fix code
This commit is contained in:
parent
9e0f1d712d
commit
31491d7ba9
@ -169,7 +169,7 @@ When you want to end a call, use hangup.
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
@telephone.command(brief="Undo link commands.")
|
@telephone.command(brief="Undo link commands.")
|
||||||
@commands.check(util.extpriv_check)
|
@commands.check(util.server_mod_check)
|
||||||
async def unlink(self, ctx, target_type, target_id, bidirectional: bool = True):
|
async def unlink(self, ctx, target_type, target_id, bidirectional: bool = True):
|
||||||
target_id = util.extract_codeblock(target_id)
|
target_id = util.extract_codeblock(target_id)
|
||||||
try:
|
try:
|
||||||
|
@ -250,7 +250,7 @@ def gen_codeblock(content):
|
|||||||
def json_encode(x): return json.dumps(x, separators=(',', ':'))
|
def json_encode(x): return json.dumps(x, separators=(',', ':'))
|
||||||
|
|
||||||
async def server_mod_check(ctx):
|
async def server_mod_check(ctx):
|
||||||
return ctx.author.permissions_in(ctx.channel).manage_channels or (await extpriv_check(ctx))
|
return ctx.channel.permissions_for(ctx.author).manage_channels or (await extpriv_check(ctx))
|
||||||
|
|
||||||
async def admin_check(ctx):
|
async def admin_check(ctx):
|
||||||
return await ctx.bot.is_owner(ctx.author)
|
return await ctx.bot.is_owner(ctx.author)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user