-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.py
47 lines (33 loc) · 981 Bytes
/
template.py
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
""" This is a template for a single-file extension. - ylcb-devs """
import discord
from discord.ext import commands
from modules.extension import Extension
from modules.utilities import logger as l
class ext_name(Extension):
"""ext_name Extension - ylcb-devs"""
def __init__(self, bot: commands.Bot):
"""
ext_name(bot)
Args:
bot (`commands.Bot`): `commands.Bot` instance
"""
"""ext_name(bot)"""
super().__init__(bot, "ext_name")
self.loop.start()
def cog_unload(self):
self.loop.cancel()
@tasks.loop(hours=1)
async def loop(self):
pass
@loop.before_loop
async def before_loop(self):
await self.bot.wait_until_ready()
@commands.command(name=command_name, aliases=[], usage=f"{prefix}command_name [arg:str]", brief="Command brief")
async def command_name(self, ctx, arg: str = None):
"""
Command brief
Args:
arg (`str`, optional): A simple argument. Defaults to `None`.
"""
def setup(bot):
bot.add_cog(ext_name(bot))