Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#Code taken from https://github.com/Rapptz/discord.py
import discord
class MyClient(discord.Client):
async def on_ready(self):
print('Logged in as')
print(self.user.name) #Adapted code here to allow different things to be printed on the screen
print(self.user.id)
print('------')
async def on_message(self, message):
# we do not want the bot to reply to itself
if message.content.startswith('!hello'): #Adapted code here and used a different format
await message.channel.send('Hello {0.author.mention}'.format(message))
client = MyClient()
client.run('NjM1NDY4MDIwNzM4OTQ5MTIw.Xa2oDA.BYP9xBMF4__3_0RZfe5XtNq6OOo')