コード例 #1
0
import discord
from discord.ext import commands
import DatabaseManager

bot = commands.Bot(command_prefix=".", help_command=None)
token = open('token.txt', 'r').read()
dbm = DatabaseManager.DbManager('Raids.db')


@bot.event
async def on_ready():
    print("READY!")


@bot.command()
async def help(ctx):
    helpEmb = discord.Embed(title="Help",
                            description="List of all Commands",
                            colour=discord.Colour.red())
    helpEmb.add_field(name="Help", value=".help", inline=False)
    helpEmb.add_field(name="Create Raid",
                      value=".raid <date> <time> <name>",
                      inline=False)
    msg = await ctx.channel.fetch_message(ctx.message.id)
    await msg.delete()
    await ctx.send(embed=helpEmb)


@bot.command()
async def raid(ctx, date, time, *, name):
    msg = await ctx.channel.fetch_message(ctx.message.id)