Skip to content

Instantly share code, notes, and snippets.

@raghavmri
Created September 2, 2020 12:47
Show Gist options
  • Save raghavmri/24966247f7246669307fc2b0dd79a06a to your computer and use it in GitHub Desktop.
Save raghavmri/24966247f7246669307fc2b0dd79a06a 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_join(member):
print(f"{member} has joined 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