mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-22 02:37:57 -05:00
[V3 Core] Embed toggling support (#1467)
* [V3 CogManagerUI] implement text-only support in [p]cogs * Change page length to 1800 + workaround for pages starting with delim * [V3 Core] text mode support for [p]contact and [p]dm * Implement text-only support in modlog and fix everything that broke because of it * Fix modlog stuff in filter too * Fix tests * Implement optional embed support in [p]help * move to .format
This commit is contained in:
@@ -328,8 +328,8 @@ class Mod:
|
||||
|
||||
try:
|
||||
await modlog.create_case(
|
||||
guild, ctx.message.created_at, "kick", user, author,
|
||||
reason, until=None, channel=None
|
||||
self.bot, guild, ctx.message.created_at, "kick",
|
||||
user, author, reason, until=None, channel=None
|
||||
)
|
||||
except RuntimeError as e:
|
||||
await ctx.send(e)
|
||||
@@ -389,8 +389,8 @@ class Mod:
|
||||
|
||||
try:
|
||||
await modlog.create_case(
|
||||
guild, ctx.message.created_at, "ban", user, author,
|
||||
reason, until=None, channel=None
|
||||
self.bot, guild, ctx.message.created_at, "ban",
|
||||
user, author, reason, until=None, channel=None
|
||||
)
|
||||
except RuntimeError as e:
|
||||
await ctx.send(e)
|
||||
@@ -442,8 +442,8 @@ class Mod:
|
||||
user_info = await self.bot.get_user_info(user_id)
|
||||
try:
|
||||
await modlog.create_case(
|
||||
guild, ctx.message.created_at, "hackban", user_info, author,
|
||||
reason, until=None, channel=None
|
||||
self.bot, guild, ctx.message.created_at, "hackban",
|
||||
user_info, author, reason, until=None, channel=None
|
||||
)
|
||||
except RuntimeError as e:
|
||||
await ctx.send(e)
|
||||
@@ -490,7 +490,7 @@ class Mod:
|
||||
|
||||
try:
|
||||
await modlog.create_case(
|
||||
guild, ctx.message.created_at, "tempban",
|
||||
self.bot, guild, ctx.message.created_at, "tempban",
|
||||
user, author, reason, unban_time
|
||||
)
|
||||
except RuntimeError as e:
|
||||
@@ -560,6 +560,7 @@ class Mod:
|
||||
user.name, user.id))
|
||||
try:
|
||||
await modlog.create_case(
|
||||
self.bot,
|
||||
guild,
|
||||
ctx.message.created_at,
|
||||
"softban",
|
||||
@@ -609,8 +610,8 @@ class Mod:
|
||||
|
||||
try:
|
||||
await modlog.create_case(
|
||||
guild, ctx.message.created_at, "unban", user, author,
|
||||
reason, until=None, channel=None
|
||||
self.bot, guild, ctx.message.created_at, "unban",
|
||||
user, author, reason, until=None, channel=None
|
||||
)
|
||||
except RuntimeError as e:
|
||||
await ctx.send(e)
|
||||
@@ -697,8 +698,8 @@ class Mod:
|
||||
|
||||
try:
|
||||
await modlog.create_case(
|
||||
guild, ctx.message.created_at, "voiceban", user, author,
|
||||
reason, until=None, channel=None
|
||||
self.bot, guild, ctx.message.created_at, "voiceban",
|
||||
user, author, reason, until=None, channel=None
|
||||
)
|
||||
except RuntimeError as e:
|
||||
await ctx.send(e)
|
||||
@@ -732,8 +733,8 @@ class Mod:
|
||||
author = ctx.author
|
||||
try:
|
||||
await modlog.create_case(
|
||||
guild, ctx.message.created_at, "voiceunban", user, author,
|
||||
reason, until=None, channel=None
|
||||
self.bot, guild, ctx.message.created_at, "voiceunban",
|
||||
user, author, reason, until=None, channel=None
|
||||
)
|
||||
except RuntimeError as e:
|
||||
await ctx.send(e)
|
||||
@@ -791,8 +792,8 @@ class Mod:
|
||||
)
|
||||
try:
|
||||
await modlog.create_case(
|
||||
guild, ctx.message.created_at, "boicemute", user, author,
|
||||
reason, until=None, channel=channel
|
||||
self.bot, guild, ctx.message.created_at, "boicemute",
|
||||
user, author, reason, until=None, channel=channel
|
||||
)
|
||||
except RuntimeError as e:
|
||||
await ctx.send(e)
|
||||
@@ -826,8 +827,8 @@ class Mod:
|
||||
await channel.send(_("User has been muted in this channel."))
|
||||
try:
|
||||
await modlog.create_case(
|
||||
guild, ctx.message.created_at, "cmute", user, author,
|
||||
reason, until=None, channel=channel
|
||||
self.bot, guild, ctx.message.created_at, "cmute",
|
||||
user, author, reason, until=None, channel=channel
|
||||
)
|
||||
except RuntimeError as e:
|
||||
await ctx.send(e)
|
||||
@@ -862,8 +863,8 @@ class Mod:
|
||||
await ctx.send(_("User has been muted in this guild."))
|
||||
try:
|
||||
await modlog.create_case(
|
||||
guild, ctx.message.created_at, "smute", user, author,
|
||||
reason, until=None, channel=None
|
||||
self.bot, guild, ctx.message.created_at, "smute",
|
||||
user, author, reason, until=None, channel=None
|
||||
)
|
||||
except RuntimeError as e:
|
||||
await ctx.send(e)
|
||||
@@ -924,8 +925,8 @@ class Mod:
|
||||
user.name, user.discriminator, channel.name))
|
||||
try:
|
||||
await modlog.create_case(
|
||||
guild, ctx.message.created_at, "voiceunmute", user, author,
|
||||
reason, until=None, channel=channel
|
||||
self.bot, guild, ctx.message.created_at, "voiceunmute",
|
||||
user, author, reason, until=None, channel=channel
|
||||
)
|
||||
except RuntimeError as e:
|
||||
await ctx.send(e)
|
||||
@@ -953,8 +954,8 @@ class Mod:
|
||||
await ctx.send(_("User unmuted in this channel."))
|
||||
try:
|
||||
await modlog.create_case(
|
||||
guild, ctx.message.created_at, "cunmute", user, author,
|
||||
reason, until=None, channel=channel
|
||||
self.bot, guild, ctx.message.created_at, "cunmute",
|
||||
user, author, reason, until=None, channel=channel
|
||||
)
|
||||
except RuntimeError as e:
|
||||
await ctx.send(e)
|
||||
@@ -985,8 +986,8 @@ class Mod:
|
||||
await ctx.send(_("User has been unmuted in this guild."))
|
||||
try:
|
||||
await modlog.create_case(
|
||||
guild, ctx.message.created_at, "sunmute", user, author,
|
||||
reason, until=None, channel=channel
|
||||
self.bot, guild, ctx.message.created_at, "sunmute",
|
||||
user, author, reason, until=None, channel=channel
|
||||
)
|
||||
except RuntimeError as e:
|
||||
await ctx.send(e)
|
||||
@@ -1209,8 +1210,8 @@ class Mod:
|
||||
else:
|
||||
try:
|
||||
case = await modlog.create_case(
|
||||
guild, message.created_at, "ban", author, guild.me,
|
||||
"Mention spam (Autoban)", until=None, channel=None
|
||||
self.bot, guild, message.created_at, "ban", author,
|
||||
guild.me, "Mention spam (Autoban)", until=None, channel=None
|
||||
)
|
||||
except RuntimeError as e:
|
||||
print(e)
|
||||
@@ -1269,7 +1270,7 @@ class Mod:
|
||||
if date is None:
|
||||
date = datetime.now()
|
||||
try:
|
||||
await modlog.create_case(guild, date,
|
||||
await modlog.create_case(self.bot, guild, date,
|
||||
"ban", member, mod,
|
||||
reason if reason else None)
|
||||
except RuntimeError as e:
|
||||
@@ -1288,7 +1289,7 @@ class Mod:
|
||||
if date is None:
|
||||
date = datetime.now()
|
||||
try:
|
||||
await modlog.create_case(guild, date, "unban",
|
||||
await modlog.create_case(self.bot, guild, date, "unban",
|
||||
user, mod, reason)
|
||||
except RuntimeError as e:
|
||||
print(e)
|
||||
|
||||
Reference in New Issue
Block a user