Testing channel restriction again

testing
sgoudham 4 years ago
parent 048de63f7f
commit 656b4558d0

@ -31,8 +31,7 @@ async def ping(ctx):
# Bot ~8Ball command
@client.command(aliases=['8ball'])
@cooldown(1, 2, BucketType.channel)
@client.get_channel(669812887564320769)
@cooldown(1, 3, BucketType.channel)
async def _8ball(ctx, *, question):
Responses = ["Hamothy is preoccupied with catching a case",
"Kate decides it will come true",
@ -74,7 +73,6 @@ async def _8ball(ctx, *, question):
await ctx.send(f'Question: {question}\nAnswer: {random.choice(Responses)}')
# Bot ~roles command allows for an embed message about
@client.command()
@commands.has_any_role('Hamothy')
@ -106,6 +104,7 @@ async def roles(ctx):
@client.command(aliases=['Kakashi'])
@cooldown(1, 10, BucketType.channel)
async def kakashi(ctx):
if ctx.get_channel("669812887564320769"):
kakashi1 = "https://cdn.discordapp.com/attachments/714671068941647933/717201077346238514/image0.jpg"
kakashi2 = "https://cdn.discordapp.com/attachments/714671068941647933/717201077669331036/image1.jpg"
kakashi3 = "https://cdn.discordapp.com/attachments/714671068941647933/717201077941829722/image2.jpg"
@ -158,11 +157,14 @@ async def kakashi(ctx):
embed = discord.Embed(title="```Random Kakashi Image```", colour=discord.Colour(0xff0000), )
embed.set_image(url=random.choice(kakashiArray))
await ctx.send(embed=embed)
else:
await ctx.send('Sorry, I only work in Bot Commands!')
@client.event
async def error():
channel = client.get_channel(669812887564320769)
await channel.send('Sorry, I only work in Bot Commands!')
# Bot Event for handling cooldown error
@client.event

Loading…
Cancel
Save