mirror of
https://github.com/Matthww/TuneBot.git
synced 2026-09-21 19:57:48 +00:00
Merge branch 'dev' into lavalink-functionality
This commit is contained in:
+4
-16
@@ -6,24 +6,14 @@ from discord.ext.commands import Context
|
||||
import humanize
|
||||
import datetime
|
||||
import lavalink
|
||||
from bot import ChristmasBot
|
||||
from utils.EmbedGenerator import EmbedGenerator
|
||||
from utils.paginator import HelpPaginator
|
||||
|
||||
|
||||
class InformationCog(commands.Cog, name="Information"):
|
||||
def __init__(self, bot: commands.Bot):
|
||||
def __init__(self, bot: ChristmasBot):
|
||||
self.bot = bot
|
||||
self.is_help_msg = True
|
||||
self.update_status.start()
|
||||
|
||||
@tasks.loop(seconds=30.0)
|
||||
async def update_status(self):
|
||||
await self.bot.wait_until_ready()
|
||||
title = "ck!connect | ck!help"
|
||||
if self.is_help_msg:
|
||||
title = "Tfoe broer"
|
||||
self.is_help_msg = not self.is_help_msg
|
||||
await self.bot.change_presence(activity=discord.Game(title))
|
||||
|
||||
@commands.cooldown(rate=1, per=5, type=commands.BucketType.user)
|
||||
@commands.command(description="PONG!", aliases=["pong"])
|
||||
@@ -53,9 +43,7 @@ class InformationCog(commands.Cog, name="Information"):
|
||||
@commands.cooldown(rate=1, per=5, type=commands.BucketType.user)
|
||||
async def invite(self, ctx: Context):
|
||||
"""Gets the invite link!"""
|
||||
link = f"https://discord.com/oauth2/authorize?client_id=643555373814382593&permissions=3230720&scope=bot%20applications.commands"
|
||||
embed = await EmbedGenerator.Message(ctx, "Add our bot to your server:", link)
|
||||
await ctx.send(embed=embed)
|
||||
await EmbedGenerator.Message(ctx, "Add our bot to your server:", self.bot.invite_link)
|
||||
|
||||
@commands.command(
|
||||
name="wlinfo",
|
||||
@@ -129,6 +117,6 @@ class InformationCog(commands.Cog, name="Information"):
|
||||
await ctx.send(embed=embed)
|
||||
|
||||
|
||||
def setup(bot: commands.Bot):
|
||||
def setup(bot: ChristmasBot):
|
||||
bot.remove_command("help")
|
||||
bot.add_cog(InformationCog(bot))
|
||||
|
||||
Reference in New Issue
Block a user