discord bot python add bio
await self.change_presence(activity = discord.Game("<inser text>"))
discord bot python add bio
await self.change_presence(activity = discord.Game("<inser text>"))
Discord.py bot example
#Anything commented out is optional
import discord
from discord.ext import commands
bot = commands.Bot(command_prefix='prefix here')
@bot.event
async def on_ready():
# await bot.change_presence(activity=discord.Game(name="Rich Presence Here"))
print('Logged in as: ' + bot.user.name)
print('Ready!n')
@bot.command()
async def commandname(ctx, *, somevariable)
#If you don't need a variable, then you only need (ctx)
# """Command description"""
Code goes here
await ctx.send('Message')
bot.run('yourtoken')
How to setup discord.py bot
#Import essentials
import discord
from discord.ext import commands
import asyncio
#Some things that makes your life easier! (aliases to make code shorter)
client = commands.Bot(command_prefix='!') #change it if you want
token = 'YOUR TOKEN HERE' #Put your token here
#Making a first text command! (Respond's when a user triggers it on Discord)
@client.command()
async def hello(ctx):
await ctx.send('Hello I am a Test Bot!')
#Tell's us if the bot is running / Runs the bot on Discord
@client.event
async def on_ready():
print('Hello, I am now running')
client.run(token)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us