async def daily(ctx): """Show the dailies""" await util.try_delete_original_message(ctx) async with ctx.typing(): output, _ = dropship.get_dropship_text() if output: await util.post_output(ctx, output, core.MAXIMUM_CHARACTERS)
async def autodaily_post(ctx): guild = ctx.guild channel_id = d.get_daily_channel_id(guild.id) if channel_id >= 0: text_channel = bot.get_channel(channel_id) output, _ = dropship.get_dropship_text() if output: posts = util.create_posts_from_lines(output, core.MAXIMUM_CHARACTERS) for post in posts: if post: await text_channel.send(post)
async def post_all_dailies(): fix_daily_channels() channel_ids = d.get_valid_daily_channel_ids() output, _ = dropship.get_dropship_text() for channel_id in channel_ids: text_channel = bot.get_channel(channel_id) if text_channel != None: guild = text_channel.guild try: if output: posts = util.create_posts_from_lines( output, core.MAXIMUM_CHARACTERS) for post in posts: await text_channel.send(post) except Exception as error: print( '[post_all_dailies] {} occurred while trying to post to channel \'{}\' on server \'{}\': {}' .format(error.__class__.__name__, text_channel.name, guild.name, error))
async def daily(ctx): """Show the dailies""" txt = dropship.get_dropship_text() await ctx.message.delete() await ctx.send(txt)