aboutsummaryrefslogtreecommitdiff
path: root/code/cogs/help.py
blob: 523d1b72f20478e289a77e5d43aeaf08e684c986 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import discord
from discord.ext import commands
import re
from discord import app_commands

from global_variables import BOT_COLOR, BOT_INVITE_LINK


class InviteButton(discord.ui.View):
    def __init__(self, timeout=180.0):
        super().__init__(timeout=timeout)
        self.value = None
        self.add_item(discord.ui.Button(label="Invite Me", url=BOT_INVITE_LINK, row=1))


class Help(commands.Cog):
    def __init__(self, bot):
        self.bot = bot

    @app_commands.command()
    async def help(self, interaction: discord.Interaction):
        "Sends the bots commands"

        embed = discord.Embed(
            title=f":musical_note: Guava Help :musical_note:", color=BOT_COLOR
        )
        embed.add_field(
            name="`/play <name/URL>`", value="Plays the requested song", inline=False
        )
        embed.add_field(
            name="`/skip`",
            value="Skips the song that is currently playing",
            inline=False,
        )
        embed.add_field(
            name="`/queue (page #)`",
            value="Sends the songs currently in queue",
            inline=False,
        )
        embed.add_field(
            name="`/stop`",
            value="Stops music, clears queue, and leaves VC",
            inline=False,
        )
        embed.add_field(
            name="`/np`", value="Sends the song that is currently playing", inline=False
        )
        embed.add_field(
            name="`/clear`", value="Completely clears the queue", inline=False
        )
        embed.add_field(
            name="`/remove <song #>`",
            value="Removes the specified song from the queue",
            inline=False,
        )
        embed.add_field(
            name="`/repeat <song/queue/off>`",
            value="Forever repeats the current song, queue, or turns repetition off",
            inline=False,
        )
        embed.add_field(
            name="`/shuffle <on/off>`",
            value="Turns song shuffling on or off",
            inline=False,
        )
        embed.add_field(
            name="`/pause`", value="Pauses the currently playing song", inline=False
        )
        embed.add_field(name="`/resume`", value="Resumes the paused song", inline=False)

        embed.add_field(
            name="`/bug`",
            value="Fill out a bug report to let the developer know of any issues",
            inline=False,
        )
        embed.add_field(
            name="`/feedback`",
            value="Give the developer feedback about Guava",
            inline=False,
        )

        embed.set_thumbnail(url=self.bot.user.avatar.url)

        view = InviteButton()
        await interaction.response.send_message(embed=embed, view=view, ephemeral=True)


async def setup(bot):
    await bot.add_cog(Help(bot))