aboutsummaryrefslogtreecommitdiffstats
path: root/bot/bot.py (unfollow)
Commit message (Collapse)AuthorLines
2019-03-07Prevent SeasonalBot from changing server icon during off-season ↵Gravatar kosayoda-2/+5
(non-evergreen) periods.
2019-03-06Update season.pyGravatar Leon Sandøy-1/+1
2019-03-05Fix myvalenstateGravatar Darth Delay-10/+15
A bug appeared, that, if a user were to have only one or two Valenstates, would throw an IndexError, thus blocking the command to run at its fullest. This commit aims at fixing this bug by refining how the leftovers are handled: Before there was only one line determining the leftover string, that was than put into the embed's add_field method with some extra stuff around it and a fixed title. This has now been changed to having a variable title changing with the length of the matches list. For example if you have 3 original matches, the matches list would be of length 2, thus the original title is displayed. If you have only 2 or just 1 match however, the matches list would be of length 1 or 0, each of which feature their own title and text now. Some style changes have been made as well: the add_field and set_image methods are now one liners.
2019-03-05Update myvalenstate.py to address requested changesGravatar Darth Delay-1/+1
A few things have been changed: - The comment under STATES = json.load(file) was useless and has been removed - A logging statement has been put under the setup function: log.debug("MyValenstate cog loaded")
2019-02-28Add .myvalenstateGravatar Darth Delay-0/+202
Closes #108 This pull request adds a beta version of the command myvalenstate. This command sends an embed containing a users valenstate to the channel it has been called in. The process used here is to first put the username into a spaceless, lower case form and than compare it to the countries listed under valenstates.json, put into the same form, using an implementation of the Levenshtein algorithm. This beta version already implements everything needed for the command to work properly. The follwing things are missing, not meant for the future full implementation or are subject to change if needed: - Short comments (25 missing) - name parameter in myvalenstate (not meant for staying/Debug) - Object names in valenstates.json (subject to change) (1) - Docstring for levenshtein (subject to change) - Docstring for myvalenstate (subject to change) (1) - The object names can be put into the right case to omit the operation operation on line 54 (lower_state = state.lower().replace(' ', ''))
2019-02-27Address grammatical errors.Gravatar Scragly-14/+11
2019-02-27Address DM failure, random_user logic, str[key] error.Gravatar Scragly-7/+16
2019-02-25changed the logging debug message.Gravatar Rohan_Iceman-1/+1
2019-02-23loaded json file in the init methodGravatar Rohan-22/+26
2019-02-22In the json file,i now have a list containing all the peoms/compliments in ↵Gravatar Rohan-104/+40
lists insted of dictionary.
2019-02-21Added a function called valentine check which checks if the the valetine ↵Gravatar Rohan-30/+15
that has to be checked needs to be a poe/compliment/custom message.
2019-02-21Made the try catch block narrow and only catching KeyErrorsGravatar Rohan-21/+21
2019-02-20Wrote the command as described in the issue #107Gravatar Rohan-0/+317
2019-02-20Update whoisvalentine.py to address requested changesGravatar Darth Delay-3/+5
A few things have been changed to address the changes listed under PR #122: - Changed the color tag of the embed from both commands from discord.Color.dark_magenta() to bots.constants.Colours.pink - Renamed valentine_facts to valentine_fact These changes are needed to fit the projects standards.
2019-02-20I did the follow changes:Gravatar Rohan-18/+18
1.Fixed indentation 2.Removed unneccessory comments 3.Re-named the varible Role to lovefest_role 4.Edited te random user function 5.Removed unneccessory f strings(just removing the f letter,lol)
2019-02-19Add .who_is_valentine and .valentine_factsGravatar Darth Delay-0/+75
Closes #102 This pull request adds the commands who_is_valentine and valentine_facts. The who_is_valentine command sends information about Saint Valentine of Terni to the channel the command has been called in. This is done by making use of the valentine_facts.json file's 'whois' attribute, which has all the information stored in it. The valentine_facts command sends a random fact with a random title to the channel the command has been called in. This is done by making use of the of the valentine_facts.json file's 'titles' and 'text' attribute, in which both, the information for the titles and the facts are stored in. Both commands do have docstrings, which explain what the command does in an easy manner. At the moment, there's a really sparse amount of facts available. I seek to add a lot more in the near future.
2019-02-18fixed the linter issue regarding the order of importsGravatar Rohan-1/+1
2019-02-18I did the following changes :Gravatar Rohan-32/+46
1.Lovefest invoke the help cmd. 2.Checks whether the user to whome the valentine should be sent has the lovefest role or not.People who have the lovefest role can only receive valentines. 3.Using role.members insted of guild.members. 4.When choosing a random valentine, if there is no one having the lovefest role,then the bot replies saying that there is no one to send a valentine to.This will be required at the initial stages of this command when in production.
2019-02-17Add direct reference to terning emoji to constants, fun cogGravatar sco1-1/+11
2019-02-17changed variable name from message to time_remainingGravatar Rohan-2/+2
2019-02-17Changed the variable name error_message to messageGravatar Rohan-2/+2
2019-02-17I did the following changes:Gravatar Rohan-1/+7
1)Added a help text to .savethedate 2)Edited the error message for cooldowns so that it shows not only seconds remaining but also minutes(if cooldowntime>60 seconds)
2019-02-17fixed linter issuesGravatar Rohan-23/+3
2019-02-17I did the following changes:Gravatar Rohan-24/+48
1) made a method to load json files 2) Removed refreshlovefest and made a method to choose a random user whenever needed 3) changed the .bemyvalentine dm to .bemyvalentine secret
2019-02-16Escape markdown in usernamesGravatar Ava-9/+13
2019-02-16Somewhat normalize argumentsGravatar Ava-5/+12
2019-02-163rd code review. Added docstring.Gravatar astieman-0/+3
2019-02-16Fixed grammar, quotation style and dictionary styleGravatar abdullah oday-11/+12
2019-02-16Unindented commentGravatar abdullah oday-1/+1
2019-02-16Fixed an issue with the requestGravatar abdullah oday-20/+19
2019-02-16Fixed log.warningGravatar abdullah oday-1/+1
2019-02-16Made warning message more explicitGravatar abdullah oday-3/+4
2019-02-16Fix import orderingGravatar Ava-1/+1
One of the dependencies seems to install `typing` from PyPi for some reason, which confused PyCharm's import optimizer.
2019-02-16Improve command help docstringGravatar Ava-8/+17
2019-02-16Added logging for KeyErrorGravatar abdullah oday-0/+2
2019-02-152nd code review complete. Default roll once and warning to roll at least ↵Gravatar astieman-2/+2
once implemented.
2019-02-16Used bot.http_session instead of creating a new session, and now checking ↵Gravatar abdullah oday-16/+19
for KeyError
2019-02-15Removed "Generator" fom log.debugGravatar abdullah oday-1/+1
2019-02-15Fixed quotation style, removed unnecessary newlineGravatar abdullah oday-14/+13
2019-02-15Refine love calculator commandGravatar Ava-61/+84
2019-02-15Fixed grammar issues, Moved constants to the top, Changed function nameGravatar abdullah oday-14/+13
2019-02-15Fix LoveCalculator 0% bugGravatar Darth Delay-3/+3
Recently a test of the .love command revealed an unintentional reaction when 100% are reached. In previous versions this command had used a gigantic conditional block, checking for the current percentage given by the love_meter formula. When reaching 0 (meaning that the UserID's evenly divided with 100) it would automatically convert that 0 to 100. A big mistake from my side back then. This has been fixed with these changes. By quickly modifying the formula to use a mod 101 instead of a mod 100, we get an accurate percentage, ranging from 0-100% instead of 0-99%. love_matches.json has also been fixed to address these changes, meaning that the lowest entry now actually is 0 and the highest 100. TL;DR: -> Edited love_meter formula to calculate mod 101 instead of mod 100 -> Edited lowest and highest entry in love_matches.json to be 0 and 100
2019-02-15The did the follwing changes :Gravatar Rohan-95/+99
> 1)The made a static method to generate random heart emoji > 2)I made a static method to get a random user using lovefest role if the person using the command dosent provide one > 3)i made a valentines attribute in the init method taking in the json data > 4) made the poem and compliment /p/c as case insensitive by using lower() to the user input
2019-02-14Code review changes implemented. Reverted so error handling is done by base bot.Gravatar astieman-15/+7
2019-02-14changed import orderGravatar abdullah oday-1/+1
2019-02-14removed print functionGravatar abdullah oday-1/+0
2019-02-14Replaced urlib with aiohttp , added docstrings and fixed issuesGravatar abdullah oday-22/+24
2019-02-14createdGravatar abdullah oday-1/+3