feature (sponsors): Add sponsor command.

Add new sponsor prompts.
Add new sponsor command.
Add `sponsor_text` table.
Add sponsor global config settings.
Update `Setting.command` to use new `widget`.
Add custom `cmd_str` support to `Message` `SettingType`.
This commit is contained in:
2022-03-12 17:27:25 +02:00
parent 826734e772
commit da9f9b02b1
11 changed files with 170 additions and 10 deletions

View File

@@ -201,13 +201,13 @@ class Setting:
raise NotImplementedError
@classmethod
async def command(cls, ctx, id):
async def command(cls, ctx, id, flags=()):
"""
Standardised command viewing/setting interface for the setting.
"""
if not ctx.args:
if not ctx.args and not ctx.msg.attachments:
# View config embed for provided cls
await ctx.reply(embed=cls.get(id).embed)
await cls.get(id).widget(ctx, flags=flags)
else:
# Check the write ward
if cls.write_ward and not await cls.write_ward.run(ctx):