From 5b58feb64608ed3503954e4bdb2bf85d9cd8d6dd Mon Sep 17 00:00:00 2001 From: esefxdz Date: Fri, 5 Jun 2026 23:13:48 +0300 Subject: [PATCH] initial commit --- .gitignore | 2 + cogs/__init__.py | 0 cogs/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 159 bytes cogs/__pycache__/chance.cpython-312.pyc | Bin 0 -> 3127 bytes cogs/__pycache__/general.cpython-312.pyc | Bin 0 -> 1487 bytes cogs/__pycache__/gifs.cpython-312.pyc | Bin 0 -> 3657 bytes cogs/chance.py | 38 ++++++++++++++++++ cogs/general.py | 18 +++++++++ cogs/gifs.py | 46 ++++++++++++++++++++++ main.py | 27 +++++++++++++ 10 files changed, 131 insertions(+) create mode 100644 .gitignore create mode 100644 cogs/__init__.py create mode 100644 cogs/__pycache__/__init__.cpython-312.pyc create mode 100644 cogs/__pycache__/chance.cpython-312.pyc create mode 100644 cogs/__pycache__/general.cpython-312.pyc create mode 100644 cogs/__pycache__/gifs.cpython-312.pyc create mode 100644 cogs/chance.py create mode 100644 cogs/general.py create mode 100644 cogs/gifs.py create mode 100644 main.py 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 0000000000000000000000000000000000000000..790c86bfb0412264ff0c8eb30112203499513c89 GIT binary patch literal 159 zcmX@j%ge<81m*I|Ss?l`h(HIQS%4zb87dhx8U0o=6fpsLpFwJV**ROqgche37009& zr>4cYy@_1ma>4<0CU8BV!RWkOcq|CnvA~ literal 0 HcmV?d00001 diff --git a/cogs/__pycache__/chance.cpython-312.pyc b/cogs/__pycache__/chance.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..599773d495c2b21cab2f90cf76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6L3*ZPP0N6zM|>Ia1#Qfaf?&WXl=Z(sg4!{hWEg2`*xuxT?nB zGUZZ;$Ap1zDO?~#Lo=;3YlkO|sCof}lOlJ$zH57i_I#y`)PLEX^Va2sx;de)a18Ef zqN8-D@SW5|gOXidxWKh&7fmO&?!n9-FTNC4XRo0s1=N-)kII6h3!;>`XV^m?+sMnwo94Em?wr`cf!b#I)u?$diIBi^Dp1n(StFCf+-X z-MA024Vr+GfZ`TZ(8mz`OMEenvSCyZ?1R45ZXax)dd{7hq)PC@ocrB#=FC0kyWgE3 z3WYr2xb}Rx`3nR1gBIB^Q!rRZ&;t&f`Osoj#z2Dw;MxXo-D6E7OE{kQ^aNLRZfro+ zIQgyS&~ZkF_ENyj4ajgc*U43^zbH~+vF(PfRz2X-&2nhg(#7C41U>Me$~aUt&TxBO z1J7uxM$@;_DcgWr$uMrFSB%(N@B&ZNeK-3sr4Xjh2G64DL6>#GL6nRR?6SpO7VGbY zQALXl>G?OrDU3-XSvwe>?%UIM?diwzGzM>tO|c$3 zYuw3AvBio-Gz9gQ=QwfRaatj7`-D$B&in1UpF{-Z32HdDQn83pTey``sUcaId)*4`5T?(feyKGg_2KDw)-@B_T z$Nk(t$d~&@`L0n;DSmN=eakKy-{oeQdsH4~lCD%!?;=Q=ijJD@YSGc%IPo8lMg{9Y zM8&JYSy%fCzR|LlNmH4gtm{IA;z|jxU%nw5fsE>b>m>*I%zSd|7sKd{upRK&TosKV zs_05_Vgx@Pn;zv$>Y!9g2^k3kWJ~=p92FK*7#_w)&Y)4;+_Oe^E_^-SpSZL?ap@=P zxufe`bt?KfmZH&<;Y zis(C5UTnXT$o8rzV}SUSSJB+p8Dqae>7kKh<;~@7f6IRe2p^0vb{<8kc4tP>eb|i?Y-v6jI-R0_;jGQ~&?~ literal 0 HcmV?d00001 diff --git a/cogs/__pycache__/gifs.cpython-312.pyc b/cogs/__pycache__/gifs.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..55d73df723724a81ef965f7497cdd9d839aad7c3 GIT binary patch literal 3657 zcmd5<-D@LN6u)=AGEI}zb?J6Rv!=URnq5rMB5J<&VZ{}M;)9D40z=G9w-b{l-kGqQ z*oR_^w4n4su?m9vX6Xw4AHKNBLzV$S*cW{esGC!y$sL+j{=lV`GsB@30b6>*{fXjR4N{^yDG53Se^DTY zRO1l`T?je!r@F8`(o0Gx8X_NhmLj2ODS%c((ZF}K_f#la3815)=tuxP9g0>1=vXLv zDu9lMqN4$HqBEV2InqsY)v69p5zhs6tONH+5c_0#%lTXX0_cg)@`e-n^v{SbnpwR)#h!hd>cZ@v^tKe zY390VYg#vsQDufxtW*nMvPmACzpx{Hrn)d8C!)sc--4f81MwE2Jn|aUb83i(w2QM^Ob;z~Dx@h?@oMs+O%Dr84m zHS5NK=*Y}y)jLka=k7>v;JU!@lW@eUeb>(#o5ls1Z_$l%?p#OC?sFi1C;x1c-xBBc z%w6-FcfT!vUH;{2wx7)HnEgb4pyqpO{@9HH@ZiXH2AYP!cI#>zMm{$B8mgG*i(zg>?uG`3i%i(zt+4HMqC6; zSLLKZ!{k_3K>YXQf5`NcuOZ*;K+X2l>}2tcbG|L3@-y8&N|_sHaa*T1n4f*Rft{7@FopHLcOq+jZ1qn)YG4QuizjuU3YQgA?() zU^a(KPovb4LnME^NLx zkZ149vweB)FIX(NB2g|Lp*GHZePq5q&YT;WbK}hUkvTukTpXE;(ZV=Ve$!?d zcDu!1f|VE0^b81oXFrI>_pa?;`$GR}`E#=$O%0?}Pf8tIyi2>ZNWY^C()Y?D{D;NP zgO4-qH;EbJuI-hYcw_id+?_3<7?qKu=Dk`ivX{Yt5n1yfjzmi7Lz4KFq#j8Nw6OE) RUVbQh#mj{ literal 0 HcmV?d00001 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