| Commit message (Collapse) | Author | Lines |
|
Mitigates recent breaking d.py changes
|
|
|
|
|
|
|
|
|
|
lists insted of dictionary.
|
|
that has to be checked needs to be a poe/compliment/custom message.
|
|
|
|
|
|
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.
|
|
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)
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
|
|
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)
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
One of the dependencies seems to install `typing` from PyPi for some
reason, which confused PyCharm's import optimizer.
|
|
|
|
|
|
once implemented.
|
|
for KeyError
|
|
|
|
|
|
|
|
|
|
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
|
|
> 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
|
|
|
|
|
|
|
|
|
|
|