Compare commits
3 Commits
d9fa5c4683
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 7467ed6006 | |||
| 4e9e5ccb2d | |||
| 136229d9a9 |
@@ -128,6 +128,7 @@ class QuoteCog(LionCog):
|
||||
@appcmds.describe(
|
||||
content="Content of the quote to add"
|
||||
)
|
||||
@cmds.has_permissions(manage_guild=True)
|
||||
async def addquote_cmd(self, ctx: LionContext, *, content: Optional[str] = None):
|
||||
await self.quotes_add_cmd(ctx, content=content)
|
||||
|
||||
@@ -138,6 +139,7 @@ class QuoteCog(LionCog):
|
||||
@appcmds.describe(
|
||||
content="Content of the quote to add"
|
||||
)
|
||||
@cmds.has_permissions(manage_guild=True)
|
||||
async def quotes_add_cmd(self, ctx: LionContext, *, content: Optional[str] = None):
|
||||
if content is not None:
|
||||
interaction = ctx.interaction
|
||||
@@ -186,9 +188,9 @@ class QuoteCog(LionCog):
|
||||
@appcmds.describe(
|
||||
quotestr="Select the quote to delete, or write the number."
|
||||
)
|
||||
@cmds.has_permissions(manage_guild=True)
|
||||
@appcmds.rename(quotestr='quote')
|
||||
async def quotes_del_cmd(self, ctx: LionContext, quotestr: str):
|
||||
# TODO: Double check group permission inheritance
|
||||
quote = await self.resolve_quote(ctx, quotestr)
|
||||
label = quote.quotelabel
|
||||
await self.quotes.delete_quote(quote.quoteid)
|
||||
@@ -200,6 +202,7 @@ class QuoteCog(LionCog):
|
||||
name='list',
|
||||
description="Display the community quotes. Quotes may also be added/edited/deleted here."
|
||||
)
|
||||
@cmds.has_permissions(manage_guild=True)
|
||||
async def quotes_list_cmd(self, ctx: LionContext):
|
||||
view = QuoteListUI(self.bot, self.quotes, ctx.community.communityid, ctx.profile.profileid, ctx.author.id)
|
||||
if ctx.interaction is None:
|
||||
@@ -217,6 +220,7 @@ class QuoteCog(LionCog):
|
||||
new_content="New content for the quote. Leave unselected to edit in multiline modal."
|
||||
)
|
||||
@appcmds.rename(quotestr='quote')
|
||||
@cmds.has_permissions(manage_guild=True)
|
||||
async def quotes_edit_cmd(self, ctx: LionContext, quotestr: str, *, new_content: Optional[str] = None):
|
||||
quote = await self.resolve_quote(ctx, quotestr)
|
||||
if new_content is not None:
|
||||
|
||||
@@ -250,7 +250,6 @@ class QuoteListUI(MessageUI):
|
||||
# Delete
|
||||
self.set_layout(
|
||||
(self.new_quote_button,
|
||||
self.jump_button,
|
||||
self.quit_button),
|
||||
(self.edit_menu,),
|
||||
(self.delete_menu,),
|
||||
@@ -259,7 +258,7 @@ class QuoteListUI(MessageUI):
|
||||
# Add Close
|
||||
self.set_layout(
|
||||
(self.new_quote_button,
|
||||
self.jump_button),
|
||||
self.quit_button),
|
||||
)
|
||||
|
||||
async def reload(self):
|
||||
|
||||
Submodule src/modules/profiles deleted from fc3bdcbb5c
Reference in New Issue
Block a user