def main(): logg("DUMMY!")
import discord import os from logger import logg logger = logg('main_bot') bot = discord.Client() if not discord.opus.is_loaded(): discord.opus.load_opus('opus') logger.info('Starts Bot, waiting to be ready') @bot.event async def on_ready(): logger.info('Bot is ready') activity = discord.Activity( name=">ajuda", type=discord.ActivityType.listening, ) await bot.change_presence(activity=activity,) @bot.event async def on_message(message): if message.content[0] != '>': return channel = message.channel logger.info(f"{message.author} | {message.content}")
from message import Message import re from collections import OrderedDict import mysql.connector as conn from ast import literal_eval from loyaltyfunction import Loyalty from pyspark.sql.functions import row_number from pyspark.sql.window import Window from cltv import CLTV from atv_points_recom import value_recommend from feedback_sentiment import FeedbackEngine from configparser import ConfigParser from getset import GetSet from insight_output import TagOutputs from logger import logg Logg = logg() import logging from segment_connect import SegmentConnect from probable_churn import probchurn # Logg.createFolder(logger_path,"basket") # logger_path='/datadrive/Document/Projects/shinjini/logger/insight/basket/' logger_1 = logging.getLogger("infolog") logger_2 = logging.getLogger("errorlog") EmailTrigger = 1 mail_body = 'Insight process for @InsightName has failed or has ended with errors. Error_description : "@error" This is an automated mail alert, do not reply to this mail.' class CRM: def NPS(self, spark, mysqldetails, InsightName, insights_repeater_total, npsFeed):