Buat perintah 8ball di Discord.py
import discord, random
from discord.ext import commands
bot = commands.Bot(command_prefix='?')
@bot.event
def on_ready():
print('Bot is online!')
@bot.command(aliases=['8ball'])
async def _8ball(ctx, *, q):
responses = ['yes', 'no', 'maybe', '...', 'problably not', 'ok']
await ctx.send(f'Question: {q}\n Answer: {random.choice(responses)}')
bot.token("your bot's token here")
The DevKid