listcord.py
Installation
python3 -m pip install -U git+https://github.com/rektdevlol/listcord.py
or
python3 -m pip install -U listcord
Discord.py Example
import listcord
from discord.ext import commands
class ListcordCog:
def __init__(self, bot):
self.bot = bot
self.listcord = listcord.Client(self.bot.user.id)
@commands.command()
async def haveivoted(self, ctx):
allVotes = await self.listcord.get_votes(self.bot.user.id)
if ctx.author.id in allVotes:
await ctx.send("You have voted!")
else:
await ctx.send("You haven't voted :c")
def setup(bot):
bot.add_cog(ListcordCog(bot))
Docs
get_votes(id)
- Get a list of user ids who have voted for the bot.
get_bot(id)
- Get the bots info, name, invite links, etc
update_guilds(bot_id, token, guilds)
- Update your guild count with your bots id, token and the amount of guilds your bot is on.
has_voted(user_id, bot_id)
- Check if a user has voted on a bot.