<commit_before>import discord
import json

with open('cogs/utils/notify.json', 'r') as f:
    notif = json.load(f)
description = '''Subreddit keyword notifier by appu1232'''

bot = discord.Client()


@bot.event
async def on_message(message):
    with open('cogs/utils/notify.json', 'r') as f:
        notif = json.load(f)
    if notif['notify'] == 'on':
        if message.author.id == notif['author'] and message.channel.id == notif['channel']:
            if notif['type'] == 'ping':
                await bot.send_message(message.channel, message.author.mention)
            elif notif['type'] == 'dm':
                if message.content:
                    await bot.send_message(message.author, message.content)
                else:
                    em = discord.Embed()
                    em = em.from_data(message.embeds[0])
                    await bot.send_message(message.author, content=None, embed=em)
            else:
                try:
                    await bot.delete_message(message)
                except:
                    pass
                if message.content:
                    await bot.send_message(message.channel, message.content)
                else:
                    em = discord.Embed()
                    em = em.from_data(message.embeds[0])
                    await bot.send_message(message.channel, content=None, embed=em)


@bot.event
async def on_ready():
    pass

bot.run(notif["bot_token"])<commit_msg>short message for when notifier bot is enabled<commit_after>import discord
import json

with open('settings/notify.json', 'r') as f:
    notif = json.load(f)
description = '''Subreddit keyword notifier by appu1232'''

bot = discord.Client()


@bot.event
async def on_message(message):
    with open('settings/notify.json', 'r') as f:
        notif = json.load(f)
    if notif['notify'] == 'on':
        if message.author.id == notif['author'] and message.channel.id == notif['channel']:
            if notif['type'] == 'ping':
                await bot.send_message(message.channel, message.author.mention)
            elif notif['type'] == 'dm':
                if message.content:
                    await bot.send_message(message.author, message.content)
                else:
                    em = discord.Embed()
                    em = em.from_data(message.embeds[0])
                    await bot.send_message(message.author, content=None, embed=em)
            else:
                try:
                    await bot.delete_message(message)
                except:
                    pass
                if message.content:
                    await bot.send_message(message.channel, message.content)
                else:
                    em = discord.Embed()
                    em = em.from_data(message.embeds[0])
                    await bot.send_message(message.channel, content=None, embed=em)


@bot.event
async def on_ready():
    print('Notifier bot enabled.')
    pass

bot.run(notif["bot_token"])
{'fraction_non_alphanumeric': 0.11731283422459893, 'fraction_numerical': 0.004010695187165776, 'mean_word_length': 1.8076923076923077, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2088840', 'n_tokens_mistral': 865, 'n_tokens_neox': 824, 'n_words': 185}