Invites is a small, easy to use cog for tracking which invites joining members use! It relies on a number of attributes added to your Bot for convenience as well as on_invite_update
- a new, custom event that is dispatched
-
Upon loading, assigns
Bot.invites
,Bot.expiring_invites
,Bot.shortest_invite
,Bot.last_update
,Bot.get_invite()
andBot.wait_for_invites()
- This is noted to reduce conflicts for developers utilising bot variables
-
Requirements
- discord.py 1.5.0+
- GUILDS, SERVER_MEMBERS and INVITES intents
manage_guild
andmanage_channels
permissions
The recommended method is to follow the instructions below to plug and load the cog into your bot, then in another cog/file you listen to on_invite_update
and manipulate the resources given to you. The event grants access to 2 parameters: the Member that was invited and the Invite that was assumedly used, example here.
- Click on
invites.py
in the repository's file directory
- Right-click the "Raw" button and click the "Save link as..." option
- Save it within your cogs directory or wherever you store/load your cogs
- Code away using the newly implemented features!
NOTE: REMEMBER TO LOAD THE COG TO BE ABLE TO USE IT'S FEATURES
There are two ways to report a problem:
- Create an issue for this repository.
- Ping me in the Discord.py server (Cyrus -
<@668906205799907348>
)
I (Cyrus) personally prefer and recommend the former but if I am around in #help or #testing then feel free to ping me in those respective channels.
Thank you in advance if you do choose to contribute - I am open to constructive criticism and will happily review any PRs sent to this repo!
Thanks to Maya for being the initial contributor to this idea I had in mind, this repo would not be here without your ideas and expertise! <3 Huge thanks to "Dog" for contributing so many improvements and optimisations, this repo is only growing thanks to you! :)