I hereby claim:
- I am Kanin on github.
- I am kanin (https://keybase.io/kanin) on keybase.
- I have a public key whose fingerprint is 2B8D 0B2D 37E4 B57A DE05 317E 136F E8EB 26D2 CA71
To claim this, I am signing this object:
__author__ = "Kanin (https://github.com/Kanin)" | |
__copyright__ = "Copyright (C) 2022 Kanin" | |
__license__ = "Public Domain" | |
__version__ = "1.0" | |
import os | |
from pathlib import Path | |
import discord | |
from PIL import Image |
@commands.command() | |
async def profile(self, ctx: Context, user: discord.Member = None): | |
user = user or ctx.author | |
canvas_size = (600, 600) | |
background = Editor(Canvas(canvas_size, color=(35, 35, 35))) | |
user_data = await self.bot.pool.fetchrow( | |
"""SELECT * FROM ( | |
SELECT row_number() OVER ( | |
ORDER BY text_xp + voice_xp DESC) AS rank, * FROM levels ORDER BY text_xp + voice_xp DESC) | |
AS _ WHERE user_id = $1""", |
@commands.command() | |
async def profile(self, ctx: Context, user: discord.Member = None): | |
user = user or ctx.author | |
canvas_size = (600, 600) | |
background = Editor(Canvas(canvas_size, color=(35, 35, 35))) | |
user_data = await self.bot.pool.fetchrow( | |
"""SELECT * FROM ( | |
SELECT row_number() OVER ( | |
ORDER BY text_xp + voice_xp DESC) AS rank, * FROM levels ORDER BY text_xp + voice_xp DESC) | |
AS _ WHERE user_id = $1""", |
import asyncio | |
import re | |
from datetime import datetime, timedelta | |
import discord | |
from discord.ext import commands | |
from bot import Bot | |
from utils import checks | |
from utils.ctx import Context |
from datetime import datetime, timezone | |
import discord | |
from discord import Option, OptionChoice | |
from discord.ext import commands, tasks | |
from bot import Bot | |
month_choices = [ | |
OptionChoice(name="January", value=1), |
@tasks.loop(hours=1) | |
async def birthday_handler(self): # sourcery no-metrics | |
now = datetime.utcnow() | |
if self.day != now.day: | |
self.day = now.day | |
self.first = True | |
data = await self.bot.pool.fetch( | |
"SELECT * FROM birthdays WHERE extract(month from birthday) = $1 AND extract(day from birthday) = $2", |
I hereby claim:
To claim this, I am signing this object: