1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-12-23 22:27:27 +00:00

Convert to discord.py main release

This commit is contained in:
Myned 2019-09-17 02:56:22 -04:00
parent 1a014d4e65
commit e3b73a6237
8 changed files with 14 additions and 16 deletions

View file

@ -17,10 +17,9 @@ verify_ssl = true
[packages]
beautifulsoup4 = "*"
"discord.py" = {extras = ["voice"],git = "https://github.com/Rapptz/discord.py",ref = "rewrite"}
"discord.py" = {extras = ["voice"],git = "https://github.com/Rapptz/discord.py"}
"hurry.filesize" = "*"
requests = "*"
[dev-packages]
lxml = "*"

View file

@ -21,7 +21,7 @@ from utils import utils as u
from utils import formatter, scraper
class MsG:
class MsG(cmds.Cog):
def __init__(self, bot):
self.bot = bot

View file

@ -8,7 +8,7 @@ from misc import exceptions as exc
from utils import utils as u
class Info:
class Info(cmds.Cog):
def __init__(self, bot):
self.bot = bot

View file

@ -13,7 +13,7 @@ from misc import checks
from utils import utils as u
class Administration:
class Admin(cmds.Cog):
def __init__(self, bot):
self.bot = bot

View file

@ -16,7 +16,7 @@ from utils import utils as u
from utils import formatter
class Bot:
class Bot(cmds.Cog):
def __init__(self, bot):
self.bot = bot
@ -182,7 +182,7 @@ class Bot:
await u.add_reaction(ctx.message, '\N{CROSS MARK}')
class Tools:
class Tools(cmds.Cog):
def __init__(self, bot):
self.bot = bot

View file

@ -12,7 +12,7 @@ from misc import checks
from utils import utils as u
class Post:
class Post(cmds.Cog):
def __init__(self, bot):
self.bot = bot

View file

@ -21,7 +21,7 @@ youtube = None
tempfile.tempdir = os.getcwd()
class Utils:
class Utils(cmds.Cog):
def __init__(self, bot):
self.bot = bot

View file

@ -26,8 +26,7 @@ bot = cmds.Bot(
command_prefix=get_prefix,
self_bot=u.config['selfbot'],
description='Modufur - A booru bot with a side of management and automated tasking'
'\nMade by @Myned#3985',
help_attrs={'aliases': ['h']}, pm_help=None)
'\nMade by @Myned#3985')
@bot.event
@ -39,7 +38,7 @@ async def on_ready():
tools.Utils(bot),
owner.Bot(bot),
owner.Tools(bot),
management.Administration(bot),
management.Admin(bot),
info.Info(bot),
booru.MsG(bot)):
bot.add_cog(cog)
@ -60,7 +59,7 @@ async def on_ready():
ctx = bot.get_channel(u.temp['startup'][1])
else:
ctx = bot.get_user(u.temp['startup'][1])
message = await ctx.get_message(u.temp['startup'][2])
message = await ctx.fetch_message(u.temp['startup'][2])
await message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
@ -80,10 +79,10 @@ async def on_ready():
if u.tasks['auto_del']:
for channel in u.tasks['auto_del']:
temp = bot.get_channel(channel)
bot.loop.create_task(u.cogs['Administration'].queue_for_deletion(temp))
bot.loop.create_task(u.cogs['Admin'].queue_for_deletion(temp))
print(f'RESTARTED : auto-deleting in #{temp.name}')
u.cogs['Administration'].deleting = True
bot.loop.create_task(u.cogs['Administration'].delete())
u.cogs['Admin'].deleting = True
bot.loop.create_task(u.cogs['Admin'].delete())
if u.config['playing'] is not '':
await bot.change_presence(activity=d.Game(u.config['playing']))