class documentation

class SocialGraphWorker:

View In Hierarchy

Class SocialGraphWorker Generates the socialgraphs for each guild API to socialgraph :social_graphs: the social graphs

Method __init__ Constructor of the SocialGraphWorker class
Async Method add_user Adds a user to the social graph :param user: the user to add :param guild: the guild the user is in :return: None
Method constructor Constructor of the SocialGraphWorker class :param data: the data of the social graph :param guilds_id: the id of the guilds :param guildsDict: the guilds :return: None
Method create_default Create a default social graph for a guild :param guild_id: the guild id :param guildData: the guild data :return: None
Method isPresent Checks if the social graph of a guild is present
Async Method on_command_importance Prints the importance of a user :param message: the message that triggered the command :param user: the user to print the importance of :param bot: the bot :return: None
Async Method on_command_printall Prints the social graph of the server :param message: the message that triggered the command :param bot: the bot :return: None
Async Method on_command_printuser_all Prints the social graph of a user :param message: the message that triggered the command :param userId: the user to print the social graph of :param bot: the bot :return: None
Async Method on_command_printuser_distance Prints the social graph of a user at a certain distance :param message: the message that triggered the command :param userId: the user to print the social graph of :param distance: the distance :param bot: the bot :return: None...
Async Method on_command_sentiment Prints the sentiment of the user :param message: the message that triggered the command :param bot: the bot :return: None
Async Method on_message Updates the social graph when a message is sent :param message: the message that was sent :param repliedMessage: the message that was replied to :return: None
Async Method remove_user Removes a user from the social graph :param user: the user to remove :param guild: the guild the user is in :return: None
Async Method save Saves the social graphs to a json file :return: None
Instance Variable social_graphs Undocumented
def __init__(self):

Constructor of the SocialGraphWorker class

async def add_user(self, user, guild):

Adds a user to the social graph :param user: the user to add :param guild: the guild the user is in :return: None

Parameters
user:discord.UserUndocumented
guildUndocumented
@printExceptions
def constructor(self, data, guilds_id, guildsDict):

Constructor of the SocialGraphWorker class :param data: the data of the social graph :param guilds_id: the id of the guilds :param guildsDict: the guilds :return: None

Parameters
data:dictUndocumented
guilds_id:set[int]Undocumented
guildsDict:dictUndocumented
@printExceptions
def create_default(self, guild_id, guildData):

Create a default social graph for a guild :param guild_id: the guild id :param guildData: the guild data :return: None

Parameters
guild_id:intUndocumented
guildDataUndocumented
@printExceptions
def isPresent(self, guild_id):

Checks if the social graph of a guild is present

@printExceptions
async def on_command_importance(self, message, user, bot):

Prints the importance of a user :param message: the message that triggered the command :param user: the user to print the importance of :param bot: the bot :return: None

Parameters
message:discord.MessageUndocumented
userUndocumented
botUndocumented
@printExceptions
async def on_command_printall(self, message, bot):

Prints the social graph of the server :param message: the message that triggered the command :param bot: the bot :return: None

Parameters
message:discord.MessageUndocumented
botUndocumented
@printExceptions
async def on_command_printuser_all(self, message, userId, bot):

Prints the social graph of a user :param message: the message that triggered the command :param userId: the user to print the social graph of :param bot: the bot :return: None

Parameters
message:discord.MessageUndocumented
userId:intUndocumented
botUndocumented
@printExceptions
async def on_command_printuser_distance(self, message, userId, distance, bot):

Prints the social graph of a user at a certain distance :param message: the message that triggered the command :param userId: the user to print the social graph of :param distance: the distance :param bot: the bot :return: None

Parameters
message:discord.MessageUndocumented
userId:intUndocumented
distanceUndocumented
botUndocumented
@printExceptions
async def on_command_sentiment(self, message, user, bot):

Prints the sentiment of the user :param message: the message that triggered the command :param bot: the bot :return: None

Parameters
message:discord.MessageUndocumented
userUndocumented
botUndocumented
@printExceptions
async def on_message(self, message, repliedMessage):

Updates the social graph when a message is sent :param message: the message that was sent :param repliedMessage: the message that was replied to :return: None

Parameters
message:discord.MessageUndocumented
repliedMessage:discord.MessageUndocumented
@printExceptions
async def remove_user(self, user, guild):

Removes a user from the social graph :param user: the user to remove :param guild: the guild the user is in :return: None

@printExceptions
async def save(self):

Saves the social graphs to a json file :return: None

social_graphs =

Undocumented