mirror of
https://github.com/uhIgnacio/EmoteManager.git
synced 2024-08-15 02:23:13 +00:00
migrate to d.py 1.0.1
This commit is contained in:
parent
0d9b93e54a
commit
943ca5d8a6
2 changed files with 2 additions and 10 deletions
9
bot.py
9
bot.py
|
@ -6,7 +6,6 @@ import traceback
|
||||||
|
|
||||||
import discord
|
import discord
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
import simple_help_formatter
|
|
||||||
|
|
||||||
logging.basicConfig(level=logging.WARNING)
|
logging.basicConfig(level=logging.WARNING)
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
@ -20,7 +19,7 @@ class Bot(commands.AutoShardedBot):
|
||||||
super().__init__(
|
super().__init__(
|
||||||
command_prefix=commands.when_mentioned,
|
command_prefix=commands.when_mentioned,
|
||||||
description=self.config.get('description', ''),
|
description=self.config.get('description', ''),
|
||||||
formatter=simple_help_formatter.HelpFormatter(),
|
help_command=commands.MinimalHelpCommand(),
|
||||||
**kwargs)
|
**kwargs)
|
||||||
|
|
||||||
self._setup_success_emojis()
|
self._setup_success_emojis()
|
||||||
|
@ -43,12 +42,6 @@ class Bot(commands.AutoShardedBot):
|
||||||
async def on_ready(self):
|
async def on_ready(self):
|
||||||
logger.info('Logged on as {0} (ID: {0.id})'.format(self.user))
|
logger.info('Logged on as {0} (ID: {0.id})'.format(self.user))
|
||||||
|
|
||||||
async def on_message(self, message):
|
|
||||||
if message.author.bot:
|
|
||||||
return
|
|
||||||
|
|
||||||
await self.process_commands(message)
|
|
||||||
|
|
||||||
# https://github.com/Rapptz/RoboDanny/blob/ca75fae7de132e55270e53d89bc19dd2958c2ae0/bot.py#L77-L85
|
# https://github.com/Rapptz/RoboDanny/blob/ca75fae7de132e55270e53d89bc19dd2958c2ae0/bot.py#L77-L85
|
||||||
async def on_command_error(self, context, error):
|
async def on_command_error(self, context, error):
|
||||||
if isinstance(error, commands.NoPrivateMessage):
|
if isinstance(error, commands.NoPrivateMessage):
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
aioec
|
aioec
|
||||||
ben_cogs
|
ben_cogs
|
||||||
discord.py @ git+https://github.com/Rapptz/discord.py@rewrite
|
discord.py>=1.0.1,<2.0.0
|
||||||
jishaku
|
jishaku
|
||||||
simple_help_formatter @ git+https://github.com/bmintz/simple-dpy-helpformatter
|
|
||||||
wand
|
wand
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue