add character limit to posts
This commit is contained in:
parent
f30502d544
commit
6c95ecbb69
1 changed files with 4 additions and 0 deletions
|
|
@ -34,6 +34,10 @@ def setup(bot: bot.Bot):
|
|||
await ctx.send(u.error_msg("Contents are empty."))
|
||||
return
|
||||
|
||||
if len(" ".join(text)) > 500:
|
||||
await ctx.send(u.error_msg(f"Post is too long!! ({len(" ".join(text))})"))
|
||||
return
|
||||
|
||||
try:
|
||||
await ctx.send(f"Creating post:\n```markdown\n{" ".join(text)}\n```")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue