Add module.
This commit is contained in:
3
bot/modules/user_config/__init__.py
Normal file
3
bot/modules/user_config/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
from .module import module
|
||||||
|
|
||||||
|
from . import commands
|
||||||
28
bot/modules/user_config/commands.py
Normal file
28
bot/modules/user_config/commands.py
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
from .module import module
|
||||||
|
|
||||||
|
from settings import UserSettings
|
||||||
|
|
||||||
|
|
||||||
|
@module.cmd(
|
||||||
|
"mytz",
|
||||||
|
group="Personal Settings",
|
||||||
|
desc=("Timezone used to display prompts. "
|
||||||
|
"(Currently {ctx.author_settings.timezone.formatted})"),
|
||||||
|
)
|
||||||
|
async def cmd_mytimezone(ctx):
|
||||||
|
"""
|
||||||
|
Usage``:
|
||||||
|
{prefix}mytz
|
||||||
|
{prefix}mytz <tz name>
|
||||||
|
Setting Description:
|
||||||
|
{ctx.author_settings.settings.timezone.long_desc}
|
||||||
|
Accepted Values:
|
||||||
|
Timezone names must be from the "TZ Database Name" column of \
|
||||||
|
[this list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
||||||
|
For example, `Europe/London`, `Australia/Melbourne`, or `America/New_York`.
|
||||||
|
Partial names are also accepted.
|
||||||
|
Examples``:
|
||||||
|
{prefix}mytz Europe/London
|
||||||
|
{prefix}mytz London
|
||||||
|
"""
|
||||||
|
await UserSettings.settings.timezone.command(ctx, ctx.author.id)
|
||||||
4
bot/modules/user_config/module.py
Normal file
4
bot/modules/user_config/module.py
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
from LionModule import LionModule
|
||||||
|
|
||||||
|
|
||||||
|
module = LionModule("User_Config")
|
||||||
Reference in New Issue
Block a user