GoldyBot.internal_modules.v4.help

 1import GoldyBot
 2from GoldyBot.utility.commands import *
 3
 4AUTHOR = 'Dev Goldy'
 5AUTHOR_GITHUB = 'https://github.com/THEGOLDENPRO'
 6OPEN_SOURCE_LINK = 'https://github.com/Goldy-Bot/Example-GoldyBot-Module'
 7
 8class Help(GoldyBot.Extension):
 9    def __init__(self, package_module=None):
10        super().__init__(self, package_module_name=package_module)
11
12    def loader(self):
13
14        @GoldyBot.command()
15        async def help(self:Help, ctx):
16            pass
17
18def load():
19    #Help(__name__) # Help extension is not done yet.
20    pass
class Help(GoldyBot.ext.extensions.Extension):
 9class Help(GoldyBot.Extension):
10    def __init__(self, package_module=None):
11        super().__init__(self, package_module_name=package_module)
12
13    def loader(self):
14
15        @GoldyBot.command()
16        async def help(self:Help, ctx):
17            pass

The base class for a Goldy Bot extension.


Example:

This is how you set up an extension in a GoldyBot module. 😍

class YourExtension(GoldyBot.Extension):
    def __init__(self, package_module=None):
        super().__init__(self, package_module_name=package_module)

    def loader(self):

        @GoldyBot.command()
        async def uwu(self:YourExtension, ctx):
            await ctx.send(f'Hi, {ctx.author.mention}! UwU!')

def load():
    YourExtension(package_module_name=__name__)
    pass
Help(package_module=None)
10    def __init__(self, package_module=None):
11        super().__init__(self, package_module_name=package_module)

Tells Goldy Bot to Load this class as an extension.

def loader(self):
13    def loader(self):
14
15        @GoldyBot.command()
16        async def help(self:Help, ctx):
17            pass

The extension's command loader. This is what Goldy Bot uses to load your commands in an extension.

def load():
19def load():
20    #Help(__name__) # Help extension is not done yet.
21    pass