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