fix(bot): 🐛 Trim +2000 character messages.
This commit is contained in:
@@ -490,9 +490,9 @@ class Calls(base.Cog):
|
||||
|
||||
except exceptions.DoesNotExist:
|
||||
await self.bot.redis.srem(constants.CHANNELS_ONCALL_SET, channel_id)
|
||||
|
||||
|
||||
await ctx.send(f"☎️ {secrets.choice(constants.MSGS_PHONE_HANGUP_ME)}")
|
||||
|
||||
|
||||
return
|
||||
|
||||
await self.bot.redis.sadd(constants.CALL_IDS_TO_FLUSH, call.id)
|
||||
@@ -767,7 +767,7 @@ class Calls(base.Cog):
|
||||
blocked_word = censorship.moderate(message.content)
|
||||
|
||||
webhook_message = None
|
||||
cleaned_content = formatting.clean(message, call_rss)
|
||||
cleaned_content = formatting.trim(formatting.clean(message, call_rss), 2000)
|
||||
|
||||
replying_to_id = None
|
||||
|
||||
@@ -975,7 +975,7 @@ class Calls(base.Cog):
|
||||
|
||||
message_id = payload.message_id
|
||||
channel_id = payload.channel_id
|
||||
content = payload.data["content"]
|
||||
content = formatting.trim(payload.data["content"], 2000)
|
||||
|
||||
channel = await models.Channel.get_or_none(id=channel_id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user