commit 5b58feb64608ed3503954e4bdb2bf85d9cd8d6dd Author: esefxdz Date: Fri Jun 5 23:13:48 2026 +0300 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..93f9abb --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +gifs/ +credentials.env \ No newline at end of file diff --git a/cogs/__init__.py b/cogs/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/cogs/__pycache__/__init__.cpython-312.pyc b/cogs/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000..790c86b Binary files /dev/null and b/cogs/__pycache__/__init__.cpython-312.pyc differ diff --git a/cogs/__pycache__/chance.cpython-312.pyc b/cogs/__pycache__/chance.cpython-312.pyc new file mode 100644 index 0000000..599773d Binary files /dev/null and b/cogs/__pycache__/chance.cpython-312.pyc differ diff --git a/cogs/__pycache__/general.cpython-312.pyc b/cogs/__pycache__/general.cpython-312.pyc new file mode 100644 index 0000000..6cf1b57 Binary files /dev/null and b/cogs/__pycache__/general.cpython-312.pyc differ diff --git a/cogs/__pycache__/gifs.cpython-312.pyc b/cogs/__pycache__/gifs.cpython-312.pyc new file mode 100644 index 0000000..55d73df Binary files /dev/null and b/cogs/__pycache__/gifs.cpython-312.pyc differ diff --git a/cogs/chance.py b/cogs/chance.py new file mode 100644 index 0000000..9a1dd49 --- /dev/null +++ b/cogs/chance.py @@ -0,0 +1,38 @@ +#this is where coinflip and dice lives +from discord.ext import commands +import random + +class Fun(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.command() + async def coin(self, ctx): + result = random.choice(['🪙 Heads', '🪙 Tails']) + await ctx.reply(f'{result}') + + @commands.command() + async def dice(self, ctx): + result = random.randint(1, 6) + await ctx.reply(f'🎲 {result}') + + @commands.command() + async def pp(self, ctx): + length = random.randint(1, 15) + pp = '8' + '=' * length + 'D' + await ctx.reply(f"{ctx.author.mention}'s pp size: {pp}") + + @commands.command() + async def rank(self, ctx): + ranks = ['Substance', 'Molecule', 'Atom', 'Proton', 'Neutron', 'Electron', 'Quark', 'Superstring', 'Singularity', 'giorgaras200'] + rank = random.choice(ranks) + await ctx.reply(f"{ctx.author.mention}'s rank: {rank}") + + @commands.command() + async def aura(self, ctx): + aura = random.randint(-1000000000, +1000000000) + await ctx.reply(f"{ctx.author.mention}'s aura: {aura:,}") + + +async def setup(bot): + await bot.add_cog(Fun(bot)) \ No newline at end of file diff --git a/cogs/general.py b/cogs/general.py new file mode 100644 index 0000000..c2b78e7 --- /dev/null +++ b/cogs/general.py @@ -0,0 +1,18 @@ +from discord.ext import commands + +class General(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.command() + async def yuuka(self, ctx): + await ctx.send('kanpeki!') + +async def setup(bot): + await bot.add_cog(General(bot)) + +@commands.Cog.listener() +async def on_command_error(self, ctx, error): + if isinstance(error, commands.CommandNotFound): + return # ignore typos silently + print(f'Error: {error}') \ No newline at end of file diff --git a/cogs/gifs.py b/cogs/gifs.py new file mode 100644 index 0000000..66c5416 --- /dev/null +++ b/cogs/gifs.py @@ -0,0 +1,46 @@ +# this is where gif commands live +import discord +from discord.ext import commands + +class Gifs(commands.Cog): + def __init__(self, bot): + self.bot = bot + + @commands.command() + async def czech(self, ctx): + await ctx.reply(file=discord.File('gifs/czech.gif')) + + @commands.command() + async def dogshit(self, ctx): + await ctx.reply(file=discord.File('gifs/dogshit.gif')) + + @commands.command() + async def how(self, ctx): + await ctx.reply(file=discord.File('gifs/how.gif')) + + @commands.command() + async def peak(self, ctx): + await ctx.reply(file=discord.File('gifs/peak.gif')) + + @commands.command() + async def please(self, ctx): + await ctx.reply(file=discord.File('gifs/please.gif')) + + @commands.command() + async def shoo(self, ctx): + await ctx.reply(file=discord.File('gifs/shoo.gif')) + + @commands.command() + async def spell(self, ctx): + await ctx.reply(file=discord.File('gifs/spell.gif')) + + @commands.command() + async def tired(self, ctx): + await ctx.reply(file=discord.File('gifs/tired.gif')) + + @commands.command() + async def touch(self, ctx): + await ctx.reply(file=discord.File('gifs/touch.gif')) + +async def setup(bot): + await bot.add_cog(Gifs(bot)) \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..8a848d8 --- /dev/null +++ b/main.py @@ -0,0 +1,27 @@ +import discord +from discord.ext import commands +from dotenv import load_dotenv +import os +import logging +import asyncio + +load_dotenv('credentials.env') + +intents = discord.Intents.default() +intents.message_content = True + +bot = commands.Bot(command_prefix='!', intents=intents) + +@bot.event +async def on_ready(): + print(f'✅ {bot.user} is online!') + +async def main(): + async with bot: + await bot.load_extension('cogs.general') + await bot.load_extension('cogs.chance') + await bot.load_extension('cogs.gifs') + await bot.start(os.getenv('DISCORD_TOKEN')) + +logging.basicConfig(level=logging.INFO) +asyncio.run(main()) \ No newline at end of file