This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import aiohttp | |
async def run(username, password): | |
session = aiohttp.ClientSession() | |
data = { | |
'client_id': 'play-valorant-web-prod', | |
'nonce': '1', | |
'redirect_uri': 'https://beta.playvalorant.com/opt_in', | |
'response_type': 'token id_token', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Campaign ID can be fetched trough the API (List all Campaigns: GET https://www.patreon.com/api/oauth2/v2/campaigns) | |
# access_token can be created on https://www.patreon.com/portal/registration/register-clients | |
# For more data, add fields to either fields[member] or fields[user]. All fields are listed on https://docs.patreon.com/#apiv2-resources | |
async def fetch_patreons(self, campaign_id, access_token): | |
patreons = {} | |
url = f'https://www.patreon.com/api/oauth2/v2/campaigns/{campaign_id}/members' | |
params = { | |
'include': 'user', | |
'fields[member]': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import orjson | |
import io | |
# Get the Giveaway message and all users that reacted and are still on the server | |
msg = await bot.get_channel(1183749648880504962).fetch_message(1183849922441773077) | |
reaction = discord.utils.get(msg.reactions, emoji='🎁') | |
user_ids = [u.id async for u in reaction.users(limit=None) if guild.get_member(u.id)] | |
# Check for users that are eligable |