mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-07 15:48:29 +02:00
Initial commit
Transfer Didier to this repo
This commit is contained in:
commit
f1138c3b56
116 changed files with 353825 additions and 0 deletions
0
data/__init__.py
Normal file
0
data/__init__.py
Normal file
55
data/constants.py
Normal file
55
data/constants.py
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
from enum import Enum
|
||||
|
||||
myId = "171671190631481345"
|
||||
didierId = "680510935164911730"
|
||||
botIDs = [
|
||||
"155149108183695360",
|
||||
"234395307759108106",
|
||||
"239631525350604801",
|
||||
"408785106942164992",
|
||||
"679679176466235399",
|
||||
"680510935164911730",
|
||||
"706148003949314069",
|
||||
"728361496874057812"
|
||||
]
|
||||
BugReports = "762668401960812554"
|
||||
CallOfCode = "626699611192688641"
|
||||
CoCGeneral = "626699611813314561"
|
||||
DeZandbak = "728361030404538488"
|
||||
ErrorLogs = "762668505455132722"
|
||||
FeatureRequests = "762668473313787964"
|
||||
|
||||
mods = {
|
||||
626699611192688641: [384457911377854467, 171671190631481345],
|
||||
728361030404538488: [171671190631481345],
|
||||
689200072268841106: [332948151226990614, 171671190631481345, 280025474485321729, 237239312385703951],
|
||||
710515840566427721: [171671190631481345, 140186024075722752, 296197359539585024]
|
||||
}
|
||||
|
||||
allowedChannels = {
|
||||
"bot-games": 634327239361691658,
|
||||
"bot-commands": 629034637955694602,
|
||||
"bot-testing": 679701786189103106,
|
||||
"shitposting": 676713433567199232,
|
||||
"didier-testings": 689202224437395573,
|
||||
"freegames": 705745297908826113,
|
||||
"bot-commandsCOCGI": 714170653124722738,
|
||||
"generalZandbak": 728361031008780422,
|
||||
"freegamesZandbak": 728545397127118898
|
||||
}
|
||||
|
||||
creationDate = 1582243200
|
||||
|
||||
holidayAPIKey = "af4e1ebe-465d-4b93-a828-b95df18e6424"
|
||||
|
||||
|
||||
class Live(Enum):
|
||||
CallOfCode = "626699611192688641"
|
||||
DidierPosting = "728361031008780422"
|
||||
General = "626699611813314561"
|
||||
|
||||
|
||||
class Zandbak(Enum):
|
||||
CallOfCode = "728361030404538488"
|
||||
DidierPosting = "728361031008780422"
|
||||
General = "728361031008780422"
|
||||
0
data/items.py
Normal file
0
data/items.py
Normal file
31
data/paginatedLeaderboard.py
Normal file
31
data/paginatedLeaderboard.py
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import discord
|
||||
from discord.ext import menus
|
||||
|
||||
|
||||
# https://github.com/Rapptz/discord-ext-menus
|
||||
class Source(menus.ListPageSource):
|
||||
def __init__(self, data, name, colour=discord.Colour.blue()):
|
||||
super().__init__(data, per_page=10)
|
||||
self.name = name
|
||||
self.colour = colour
|
||||
|
||||
async def format_page(self, menu: menus.MenuPages, entries):
|
||||
offset = menu.current_page * self.per_page
|
||||
|
||||
description = ""
|
||||
for i, v in enumerate(entries, start=offset):
|
||||
# Check if the person's name has to be highlighted
|
||||
if v.startswith("**") and v.endswith("**"):
|
||||
description += "**"
|
||||
v = v[2:]
|
||||
description += "{}: {}\n".format(i + 1, v)
|
||||
embed = discord.Embed(colour=self.colour)
|
||||
embed.set_author(name=self.name)
|
||||
embed.description = description
|
||||
embed.set_footer(text="{}/{}".format(menu.current_page + 1, self.get_max_pages()))
|
||||
return embed
|
||||
|
||||
|
||||
class Pages(menus.MenuPages):
|
||||
def __init__(self, source, clear_reactions_after, timeout=30.0):
|
||||
super().__init__(source, timeout=timeout, delete_message_after=True, clear_reactions_after=clear_reactions_after)
|
||||
28
data/storePages.py
Normal file
28
data/storePages.py
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import discord
|
||||
from discord.ext import menus
|
||||
|
||||
|
||||
# https://github.com/Rapptz/discord-ext-menus
|
||||
class Source(menus.ListPageSource):
|
||||
def __init__(self, data):
|
||||
super().__init__(data, per_page=10)
|
||||
self.name = "Didier Store"
|
||||
self.colour = discord.Colour.blue()
|
||||
|
||||
async def format_page(self, menu: menus.MenuPages, entries):
|
||||
offset = menu.current_page * self.per_page
|
||||
|
||||
embed = discord.Embed(colour=self.colour)
|
||||
embed.set_author(name=self.name)
|
||||
embed.description = "Heb je een idee voor een item? DM DJ STIJN met je idee!"
|
||||
embed.set_footer(text="{}/{}".format(menu.current_page + 1, self.get_max_pages()))
|
||||
|
||||
for i, v in enumerate(entries, start=offset):
|
||||
embed.add_field(name="#{} - {}".format(v[0], v[1]), value="{:,} Didier Dinks".format(v[2]))
|
||||
|
||||
return embed
|
||||
|
||||
|
||||
class Pages(menus.MenuPages):
|
||||
def __init__(self, source, clear_reactions_after, timeout=30.0):
|
||||
super().__init__(source, timeout=timeout, delete_message_after=True, clear_reactions_after=clear_reactions_after)
|
||||
Loading…
Add table
Add a link
Reference in a new issue