import discord from discord.ext import commands import random client = commands.Bot(command_prefix="am.", case_insensitive=True) client.remove_command("help") @client.event async def on_ready(): for guild in client.guilds: for channel in guild.text_channels: if str(channel) == "testing": await channel.send('I have been summoned! @ Me for my prefix!') print('Active in {}\n Member Count : {}'.format(guild.name, guild.member_count)) @client.event async def on_command_error(ctx, error): if isinstance(error, commands.CommandOnCooldown): msg = '**Your On Cooldown**, please try again in {:.2f}s'.format(error.retry_after) await ctx.send(msg) @client.command(pass_context=True) @commands.cooldown(1, 15, commands.BucketType.user) async def info(ctx): mention = ctx.author.mention embed = discord.Embed( colour=discord.Colour.blue() ) embed.set_author(name='Heres Some Information:') embed.add_field(name='505', value='Hey, Im 505 Im a bot made by Cortax You can use >help to see my commands!', inline=False) await ctx.channel.send(mention, embed=embed) @client.command(pass_context=True) @commands.cooldown(1, 15, commands.BucketType.user) async def Music(ctx): embed = discord.Embed( colour=discord.Colour.blue() ) embed.set_author(name='My Favorite Songs:') embed.add_field(name='505 - Arctic Monkeys', value='https://www.youtube.com/watch?v=MrmPDUvKyLs', inline=False) embed.add_field(name='Khalid - Location', value='https://www.youtube.com/watch?v=by3yRdlQvzs', inline=False) embed.add_field(name='lil peep - star shopping', value='https://www.youtube.com/watch?v=qwzQPh7dW_4', inline=False) await ctx.channel.send(embed=embed) @client.command(pass_context=True) @commands.cooldown(1, 15, commands.BucketType.user) async def ******(ctx): embed = discord.Embed( colour=discord.Colour.blue() ) embed.set_author(name='How To ****** Me:') embed.add_field(name='**COMING SOON**', value='⠀', inline=False) await ctx.channel.send(embed=embed) @client.command(pass_context=True) @commands.cooldown(1, 15, commands.BucketType.user) async def start(ctx): embed = discord.Embed( colour=discord.Colour.red() ) embed.set_author(name='When I Was First Started:') embed.add_field(name='I was first started on: 2021-04-11', value='**And I Will Be Going Public Hopefully Soon**', inline=False) await ctx.channel.send(embed=embed) @client.command() async def leave(ctx): await ctx.guild.leave() @client.command() @commands.is_owner() async def close(ctx): message = await ctx.channel.send("Farewell Friend") message_id = message.id await message.add_reaction("❤") await client.close() @client.command() @commands.is_owner() async def clear(ctx, amount=10): await ctx.channel.purge(limit=amount) await ctx.send(f':white_check_mark: Cleared {amount} messages!') determine_flip = ['heads', 'tails'] @client.command() @commands.cooldown(1, 15, commands.BucketType.user) async def coin(ctx, arg): if random.choice(determine_flip) == 'heads': embed = discord.Embed(title='The Results Are In:', description=f'It was tails', color=discord.Colour.red()) await ctx.send(arg, embed=embed) elif random.choice(determine_flip) == 'It was tails': embed = discord.Embed(title='The Results Are In:', description=f'It was heads', color=discord.Colour.blue()) await ctx.send(embed=embed) @client.event @commands.cooldown(1, 30, commands.BucketType.user) async def on_message(message): mention = f'<@!{client.user.id}>' if mention in message.content: await message.channel.send("My prefix is 'am.' meaning Arctic Monkeys") client.run("My token here")