| 123456789101112131415 |
- import discord
- import os
- from typing import Optional
- from query.guild import get_output_channel
- async def report(bot, message, guild: Optional[discord.Guild]=None):
- channel = bot.get_channel(bot.OUTPUT_CHANNEL_ID)
- if guild:
- message = f"**{guild}** | {message}"
- try: channel = bot.get_channel(get_output_channel(guild.id))
- except: pass
- await channel.send(message)
|