mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 13:34:40 +00:00
Function for idv3 and bugfix
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import logging
|
||||
# define an asynchronous generator
|
||||
LOGGER = logging.getLogger("discord")
|
||||
|
||||
async def async_iterator_generator(range_of_iterable):
|
||||
"""
|
||||
Generate asynchronouse iterator.
|
||||
@@ -87,8 +90,10 @@ async def get_stats(client, ctx, history_limit):
|
||||
|
||||
async def discord_friendly_reply(ctx, message_content, file=None):
|
||||
if len(message_content) < 999:
|
||||
LOGGER.info("Wiadomosci ponizej 999 znakow")
|
||||
await ctx.reply(message_content)
|
||||
else:
|
||||
LOGGER.info("Wiadomosci powyzej 999 znakow")
|
||||
while len(message_content) > 999:
|
||||
await ctx.reply(message_content[:999])
|
||||
message_content = message_content[999:]
|
||||
@@ -97,8 +102,10 @@ async def discord_friendly_reply(ctx, message_content, file=None):
|
||||
|
||||
async def discord_friendly_send(ctx, message_content, file=None):
|
||||
if len(message_content) < 999:
|
||||
LOGGER.info("Wiadomosci ponizej 999 znakow")
|
||||
await ctx.send(message_content)
|
||||
else:
|
||||
LOGGER.info("Wiadomosci powyzej 999 znakow")
|
||||
while len(message_content) > 999:
|
||||
await ctx.send(message_content[:999])
|
||||
message_content = message_content[999:]
|
||||
|
||||
Reference in New Issue
Block a user