Tharpa
0
Q:

discord.py bot example

import discord
import bot
from discord.ext import commands

bot = commands.Bot(command_prefix="", owner_id=)

@bot.event
async def on_ready():
  await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name=""))
 
bot.run("")
0
import discord

client = discord.Client()

@client.event
async def on_ready():
    print('Logged in as {0.user}'.format(client))

@client.event
async def on_message(message):
    if message.author == client.user:
        return

    if message.content.startswith('$hello'):
        await message.channel.send('Hello!')

client.run('your token here')
3

New to Communities?

Join the community