Skip to content

Instantly share code, notes, and snippets.

@raghavmri
Created September 2, 2020 12:51
Show Gist options
  • Save raghavmri/3a19220deee598424c0450e26f7d35a9 to your computer and use it in GitHub Desktop.
Save raghavmri/3a19220deee598424c0450e26f7d35a9 to your computer and use it in GitHub Desktop.
import discord
from discord.ext import commands
bot = commands.Bot(command_prefix='!')
@bot.event
async def on_ready():
print('Logged in as')
print(bot.user.name)
print(bot.user.id)
print('------')
@bot.event
async def on_member_remove(member):
print(f"{member} has left the server")
@bot.command()
async def hello(ctx):
await ctx.send('Hello Friend')
bot.run(" Your Discord Bot Token")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment