Skip to content

Commit 11bdf44

Browse files
committed
Add textall command
1 parent e3daf07 commit 11bdf44

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

spam/spam.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,18 @@ async def text(self, ctx):
121121
msg = "**Blocked Text:**\n"+msg
122122
await menu(ctx, list(pagify(msg)), DEFAULT_CONTROLS)
123123

124+
@_list.command()
125+
async def textall(self, ctx):
126+
""" Shows a list of blocked texts"""
127+
strings = await self.config.guild(ctx.guild).strings()
128+
msg = ""
129+
for key in strings:
130+
msg += "**{}** ({}) \n".format(key, strings[key])
131+
if not msg:
132+
await ctx.maybe_send_embed("List is empty.")
133+
msg = "**Blocked Text:**\n"+msg
134+
await menu(ctx, list(pagify(text=msg, page_length=999999999)), DEFAULT_CONTROLS)
135+
124136
@_list.command()
125137
async def server(self, ctx):
126138
""" Shows a list of blocked servers """

0 commit comments

Comments
 (0)