Update configuration and README for improved setup and security; disable default API and emoji sync, and enhance Discord permission checks in API routes.
Co-authored-by: Cursor <cursoragent@cursor.com>
74
bot/games/__init__.py
Normal file
@@ -0,0 +1,74 @@
|
||||
# ╔══════════════════════════════════════════════════════════════════╗
|
||||
# ║ ║
|
||||
# ║ ░█▀▀░█▀█░█▀▄░█▀▀░█░█ ░█▀▄░█▀▀░█░█░█▀▀ ║
|
||||
# ║ ░█░░░█░█░█░█░█▀▀░▄▀▄ ░█░█░█▀▀░▀▄▀░▀▀█ ║
|
||||
# ║ ░▀▀▀░▀▀▀░▀▀░░▀▀▀░▀░▀ ░▀▀░░▀▀▀░░▀░░▀▀▀ ║
|
||||
# ║ ║
|
||||
# ║ © 2026 CodeX Devs — All Rights Reserved ║
|
||||
# ║ ║
|
||||
# ║ discord ── https://discord.gg/codexdev ║
|
||||
# ║ youtube ── https://youtube.com/@CodeXDevs ║
|
||||
# ║ github ── https://github.com/RayExo ║
|
||||
# ║ ║
|
||||
# ╚══════════════════════════════════════════════════════════════════╝
|
||||
|
||||
"""Discord-Games
|
||||
|
||||
A library designed for simple implementation of various classical games into a discord.py bot
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import NamedTuple
|
||||
|
||||
#import os
|
||||
#os.system("pip install chess")
|
||||
#os.system("pip install english-words")
|
||||
#os.system("pip install pillow")
|
||||
#os.system("pip install typing_extensions")
|
||||
#from .aki import Akinator
|
||||
from .battleship import BattleShip
|
||||
from .chess_game import Chess
|
||||
from .connect_four import ConnectFour
|
||||
#from .hangman import Hangman
|
||||
from .tictactoe import Tictactoe
|
||||
from .twenty_48 import Twenty48, create_2048_emojis
|
||||
from .typeracer import TypeRacer
|
||||
from .rps import RockPaperScissors
|
||||
from .reaction_test import ReactionGame
|
||||
from .country_guess import CountryGuesser
|
||||
from .wordle import Wordle
|
||||
|
||||
__all__: tuple[str, ...] = (
|
||||
"BattleShip",
|
||||
"Chess",
|
||||
"ConnectFour",
|
||||
"Tictactoe",
|
||||
"Twenty48",
|
||||
"create_2048_emojis",
|
||||
"TypeRacer",
|
||||
"RockPaperScissors",
|
||||
"ReactionGame",
|
||||
"CountryGuesser",
|
||||
"Wordle",
|
||||
)
|
||||
|
||||
__title__ = "discord_games"
|
||||
__version__ = "1.10.6"
|
||||
__author__ = "Tom-the-Bomb"
|
||||
__license__ = "MIT"
|
||||
__copyright__ = "Copyright 2021-present Tom-the-Bomb"
|
||||
|
||||
|
||||
class VersionInfo(NamedTuple):
|
||||
major: int
|
||||
minor: int
|
||||
micro: int
|
||||
|
||||
|
||||
version_info: VersionInfo = VersionInfo(
|
||||
major=1,
|
||||
minor=10,
|
||||
micro=6,
|
||||
)
|
||||
|
||||
del NamedTuple, VersionInfo
|
||||
BIN
bot/games/assets/2048-emoji-asset-examples/0.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
bot/games/assets/2048-emoji-asset-examples/1024.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
bot/games/assets/2048-emoji-asset-examples/128.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
bot/games/assets/2048-emoji-asset-examples/16.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
bot/games/assets/2048-emoji-asset-examples/2.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
bot/games/assets/2048-emoji-asset-examples/2048.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
bot/games/assets/2048-emoji-asset-examples/256.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
bot/games/assets/2048-emoji-asset-examples/32.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
bot/games/assets/2048-emoji-asset-examples/4.png
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
BIN
bot/games/assets/2048-emoji-asset-examples/4096.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
bot/games/assets/2048-emoji-asset-examples/512.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
bot/games/assets/2048-emoji-asset-examples/64.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
bot/games/assets/2048-emoji-asset-examples/8.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
bot/games/assets/2048-emoji-asset-examples/8192.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
bot/games/assets/ClearSans-Bold.ttf
Normal file
BIN
bot/games/assets/HelveticaNeuBold.ttf
Normal file
BIN
bot/games/assets/battleship.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
bot/games/assets/country-data/Afghanistan.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
bot/games/assets/country-data/Albania.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
bot/games/assets/country-data/Algeria.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
bot/games/assets/country-data/American Samoa.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
bot/games/assets/country-data/Andorra.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
bot/games/assets/country-data/Angola.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
bot/games/assets/country-data/Anguilla.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
bot/games/assets/country-data/Antarctica.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
bot/games/assets/country-data/Antigua and Barbuda.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
bot/games/assets/country-data/Argentina.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
bot/games/assets/country-data/Armenia.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
bot/games/assets/country-data/Aruba.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
bot/games/assets/country-data/Australia.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
bot/games/assets/country-data/Austria.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
bot/games/assets/country-data/Azerbaijan.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
bot/games/assets/country-data/Bahamas.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
bot/games/assets/country-data/Bahrain.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
bot/games/assets/country-data/Bangladesh.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
bot/games/assets/country-data/Barbados.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
bot/games/assets/country-data/Belarus.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
bot/games/assets/country-data/Belgium.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
bot/games/assets/country-data/Belize.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
bot/games/assets/country-data/Benin.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
bot/games/assets/country-data/Bermuda.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
bot/games/assets/country-data/Bhutan.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
bot/games/assets/country-data/Bolivia.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
bot/games/assets/country-data/Bosnia.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
bot/games/assets/country-data/Botswana.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
bot/games/assets/country-data/Bouvet Island.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
bot/games/assets/country-data/Brazil.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
bot/games/assets/country-data/British Indian Ocean Territory.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
bot/games/assets/country-data/Brunei.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
bot/games/assets/country-data/Bulgaria.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
bot/games/assets/country-data/Burkina Faso.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
bot/games/assets/country-data/Burundi.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
bot/games/assets/country-data/Cambodia.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
bot/games/assets/country-data/Cameroon.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
bot/games/assets/country-data/Canada.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
bot/games/assets/country-data/Cape Verde.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
bot/games/assets/country-data/Cayman Islands.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
bot/games/assets/country-data/Central African Republic.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
bot/games/assets/country-data/Chad.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
bot/games/assets/country-data/Chile.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
bot/games/assets/country-data/China.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
bot/games/assets/country-data/Christmas Island.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
bot/games/assets/country-data/Cocos Islands.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
bot/games/assets/country-data/Colombia.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
bot/games/assets/country-data/Comoros.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
bot/games/assets/country-data/Congo.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
bot/games/assets/country-data/Cook Islands.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
bot/games/assets/country-data/Costa Rica.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
bot/games/assets/country-data/Cote D'Ivoire.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
bot/games/assets/country-data/Croatia.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
bot/games/assets/country-data/Cuba.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
bot/games/assets/country-data/Cyprus.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
bot/games/assets/country-data/Czech Republic.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
bot/games/assets/country-data/Democratic Republic of Congo.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
bot/games/assets/country-data/Denmark.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
bot/games/assets/country-data/Djibouti.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
bot/games/assets/country-data/Dominica.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
bot/games/assets/country-data/Dominican Republic.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
bot/games/assets/country-data/Ecuador.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
bot/games/assets/country-data/Egypt.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
bot/games/assets/country-data/El Salvador.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
bot/games/assets/country-data/Equatorial Guinea.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
bot/games/assets/country-data/Eritrea.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
bot/games/assets/country-data/Estonia.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
bot/games/assets/country-data/Ethiopia.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
bot/games/assets/country-data/Falkland Islands.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
bot/games/assets/country-data/Faroe Islands.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
bot/games/assets/country-data/Fiji.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
bot/games/assets/country-data/Finland.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
bot/games/assets/country-data/France.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
bot/games/assets/country-data/French Guiana.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
bot/games/assets/country-data/French Polynesia.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
bot/games/assets/country-data/French Southern Territories.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
bot/games/assets/country-data/Gabon.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
bot/games/assets/country-data/Gambia.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
bot/games/assets/country-data/Georgia.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
bot/games/assets/country-data/Germany.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
bot/games/assets/country-data/Ghana.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
bot/games/assets/country-data/Gibraltar.png
Normal file
|
After Width: | Height: | Size: 23 KiB |