Example #1
0
async def on_message(message):
    r = DictionaryReader()
    # we do not want the bot to reply to itself
    if message.author == client.user:
        return
        
    if message.content.startswith(prefix):
        await messageHandler(message)
        
    if message.channel.name != None and message.channel.name in r.logChannels():
        logger.log(message)    
Example #2
0
async def on_message(message):
    r = DictionaryReader()

    if message.channel.id == int(r.perspectiveLogChannelH2P()):
        await toxicity.addReactions(r, message)

    # we do not want the bot to reply to itself
    if message.author == client.user:
        return
        
    if message.content.startswith(prefix):
        await messageHandler(message)
        
    if isinstance(message.channel, DMChannel) or message.channel.name in r.logChannels():
        logger.log(message)
        await toxicity.measure(client, message)