Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import discord
- from discord.ext import commands
- client = commands.Bot(command_prefix='.')
- ignore_members = []
- @client.event
- async def on_ready():
- print('Logged in as')
- print(client.user.name)
- print(client.user.id)
- print('------')
- @client.event
- async def on_message(message):
- if message.author.bot: return
- await message.channel.send("{0.author} : {0.content}".format(message))
- await client.process_commands(message)
- @client.event
- async def on_message_delete(message):
- if message.author.bot: return
- await message.channel.send("Deleted: {0.author} : {0.content}".format(message))
- @client.event
- async def on_message_edit(before,after):
- if before.author.bot: return
- await before.channel.send("Edited: {} : from '{}' to '{}'".format(before.content,before.content,after.content))
- @client.command()
- async def ping(ctx):
- await ctx.send("pong!")
- @client.command()
- async def ignore(ctx):
- ignore_members.append(ctx.author)
- await ctx.send("{} your name added to ignore list.".format(ctx.author))
- @client.command()
- async def ignorelist(ctx):
- await ctx.send(ignore_members)
- @client.command()
- async def echo(ctx,*args):
- output = ''
- for word in args[0:-1]:
- output += word
- output += ' '
- for x in range(int(args[-1])):
- await ctx.send(output)
- @client.command()
- async def calculate(ctx):
- await ctx.send("Result :")
- client.run('NTY5NDQxMzM5MjM4OTA3OTE0.XLwruQ.0Kvgzt4gn8PdDF4MZy0Gvyhd1Fc')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement