original_docstring: Processes messages sent to the bot.
docstring: Processes messages sent to the bot.
docstring_tokens: Processes messages sent to the bot .
code: async def process_modmail(self, message):
          """Processes messages sent to the bot."""
          try:
              await message.add_reaction('✅')
          except discord.HTTPException:
              pass
  
          guild = self.guild
          author = message.author
          topic = f'User ID: {author.id}'
          channel = discord.utils.get(guild.text_channels, topic=topic)
          categ = discord.utils.get(guild.categories, name='Mod Mail')
          archives = discord.utils.get(guild.categories, name='Mod Mail Archives')
          top_chan = categ.channels[0] #bot-info
          blocked = top_chan.topic.split('Blocked\n-------')[1].strip().split('\n')
          blocked = [x.strip() for x in blocked]
  
          if str(message.author.id) in blocked:
              return await message.author.send(embed=self.blocked_em)
  
          em = discord.Embed(title='Thanks for the message!')
          em.description = 'The moderation team will get back to you as soon as possible!'
          em.color = discord.Color.green()
          mention = self.config.get('MENTION') or '@here'
  
          if channel:
              if channel.category == archives:
                  await channel.edit(category=categ)
                  await channel.send(mention, embed=self.format_info(message))
              await self.send_mail(message, channel, from_mod=False)
          else:
              await message.author.send(embed=em)
              channel = await guild.create_text_channel(
                  name=self.format_name(author, guild.text_channels),
                  category=categ
                  )
              await channel.edit(topic=topic)
              await channel.send(mention, embed=self.format_info(message))
              await self.send_mail(message, channel, from_mod=False)
           
          db_log = f'{message.author.name} (User) {message.created_at.strftime("%Y-%b-%d %H:%M:%S")} || {message.content}'
          async with self.db.acquire() as con:
              await con.execute(f"INSERT INTO modmail_log VALUES ($1, $2)", author.id, db_log)
          print("Log success")
code_tokens: async def process_modmail ( self , message ) : try : await message . add_reaction ( '✅')  except discord . HTTPException : pass guild = self . guild author = message . author topic = f'User ID: {author.id}' channel = discord . utils . get ( guild . text_channels , topic = topic ) categ = discord . utils . get ( guild . categories , name = 'Mod Mail' ) archives = discord . utils . get ( guild . categories , name = 'Mod Mail Archives' ) top_chan = categ . channels [ 0 ] blocked = top_chan . topic . split ( 'Blocked\n-------' ) [ 1 ] . strip ( ) . split ( '\n' ) blocked = [ x . strip ( ) for x in blocked ] if str ( message . author . id ) in blocked : return await message . author . send ( embed = self . blocked_em ) em = discord . Embed ( title = 'Thanks for the message!' ) em . description = 'The moderation team will get back to you as soon as possible!' em . color = discord . Color . green ( ) mention = self . config . get ( 'MENTION' ) or '@here' if channel : if channel . category == archives : await channel . edit ( category = categ ) await channel . send ( mention , embed = self . format_info ( message ) ) await self . send_mail ( message , channel , from_mod = False ) else : await message . author . send ( embed = em ) channel = await guild . create_text_channel ( name = self . format_name ( author , guild . text_channels ) , category = categ ) await channel . edit ( topic = topic ) await channel . send ( mention , embed = self . format_info ( message ) ) await self . send_mail ( message , channel , from_mod = False ) db_log = f'{message.author.name} (User) {message.created_at.strftime("%Y-%b-%d %H:%M:%S")} || {message.content}' async with self . db . acquire ( ) as con : await con . execute ( f"INSERT INTO modmail_log VALUES ($1, $2)" , author . id , db_log ) print ( "Log success" )
short_docstring: Processes messages sent to the bot.
short_docstring_tokens: Processes messages sent to the bot .
comment: """Processes messages sent to the bot."""$SEP$#bot-info