diff options
| author | Joshua Liu <joshua.liu@sourceobby.com> | 2025-11-09 15:38:29 -0500 |
|---|---|---|
| committer | Joshua Liu <joshua.liu@sourceobby.com> | 2025-11-09 15:38:29 -0500 |
| commit | fecffeb0013a26867ed445d476b076667a3090f2 (patch) | |
| tree | 5d30a258b35f8addc04e54541b7be8a943fd73e6 | |
| parent | 2a343208d8e2aaecd010b2ddfbf7c78094e28efa (diff) | |
feat: rewrote main.py to just call bigresult.py
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | .idea/misc.xml | 3 | ||||
| -rw-r--r-- | .idea/workspace.xml | 48 | ||||
| -rw-r--r-- | bigresult.py | 57 | ||||
| -rw-r--r-- | commands/funny.py | 40 | ||||
| -rw-r--r-- | main.py | 11 |
6 files changed, 148 insertions, 12 deletions
@@ -1,2 +1,3 @@ .venv .idea +.env diff --git a/.idea/misc.xml b/.idea/misc.xml index b5789dd..46c98db 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <project version="4"> + <component name="Black"> + <option name="sdkName" value="Python 3.13 (bigresultplus)" /> + </component> <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.13 (bigresultplus)" project-jdk-type="Python SDK" /> </project>
\ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index eaf4df8..ccd56e3 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,15 +1,35 @@ <?xml version="1.0" encoding="UTF-8"?> <project version="4"> + <component name="AutoImportSettings"> + <option name="autoReloadType" value="SELECTIVE" /> + </component> <component name="ChangeListManager"> - <list default="true" id="bf161059-c7a2-4c78-9db4-a3015d4ca7df" name="Changes" comment="" /> + <list default="true" id="bf161059-c7a2-4c78-9db4-a3015d4ca7df" name="Changes" comment=""> + <change afterPath="$PROJECT_DIR$/commands/funny.py" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/bigresult.py" beforeDir="false" afterPath="$PROJECT_DIR$/bigresult.py" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" /> + </list> <option name="SHOW_DIALOG" value="false" /> <option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="LAST_RESOLUTION" value="IGNORE" /> </component> - <component name="ProjectColorInfo"><![CDATA[{ - "associatedIndex": 4 -}]]></component> + <component name="FileTemplateManagerImpl"> + <option name="RECENT_TEMPLATES"> + <list> + <option value="Python Script" /> + </list> + </option> + </component> + <component name="Git.Settings"> + <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> + </component> + <component name="ProjectColorInfo">{ + "associatedIndex": 4 +}</component> <component name="ProjectId" id="358Efh5eyObD4rEFv07EOTUmgbs" /> <component name="ProjectViewState"> <option name="hideEmptyMiddlePackages" value="true" /> @@ -18,7 +38,11 @@ <component name="PropertiesComponent"><![CDATA[{ "keyToString": { "ModuleVcsDetector.initialDetectionPerformed": "true", - "RunOnceActivity.ShowReadmeOnStart": "true" + "RunOnceActivity.ShowReadmeOnStart": "true", + "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true", + "RunOnceActivity.git.unshallow": "true", + "SHELLCHECK.PATH": "/home/jliu/.local/share/JetBrains/PyCharmCE2025.2/Shell Script/shellcheck", + "git-widget-placeholder": "deploy" } }]]></component> <component name="SharedIndexes"> @@ -38,4 +62,18 @@ </task> <servers /> </component> + <component name="UnknownFeatures"> + <option featureType="com.intellij.fileTypeFactory" implementationName=".env" /> + </component> + <component name="Vcs.Log.Tabs.Properties"> + <option name="TAB_STATES"> + <map> + <entry key="MAIN"> + <value> + <State /> + </value> + </entry> + </map> + </option> + </component> </project>
\ No newline at end of file diff --git a/bigresult.py b/bigresult.py index 80fb67e..fbd3dd6 100644 --- a/bigresult.py +++ b/bigresult.py @@ -3,27 +3,70 @@ import dotenv from discord.ext import commands import random import threading +import time +from main import client +from commands.funny import BigCommands class BigResultPlus(commands.Bot): def __init__(self): - self.cmds = {} - - def initialize_commands(self): - return + self.snipe_active = False + pass + + @client.command(name="snipe") + async def snipe(self, ctx): + await ctx.reply("watch yourself") + self.snipe_active = True + pass + + @client.command(name="bigresult") + async def teach(self, ctx): + await ctx.reply( + "https://cdn.discordapp.com/attachments/427176475406630914/1302392181448900649/image.png?ex=6727f2bd&is=6726a13d&hm=6092f4fba06412feac26a16a6900bf6e6122d66506f60bfcc0bc7101ecede4db&") + + @client.command(name="mod") + async def mod(self, ctx): + await ctx.reply( + ">>> *pees in ur ass*\nI am a bot and this action was performed automatically. Please contact the moderators of this server if you have any questions or concerns.") + + @client.command(name="1984") + async def orwell(self, ctx): + if (random.randint(1, 5) == 2): + await ctx.reply(f">>> {ctx.author} has been warned: \n\nBad word usage") + else: + await ctx.reply( + "https://media.discordapp.net/attachments/865417026519957526/866575047459209236/video0-1-1.mov?ex=672d0e27&is=672bbca7&hm=3c80837685cb800ad817855b6463e4e1875dc009c6fc4540eff749c7387c4241&") + + @client.command(name="teachmethebigresult") + async def teachbigresult(self, ctx): + await ctx.reply("take b36 with Nick Cheng. join the 'Big Result' club") + + @client.command(name="ivotedfor") + async def voot(self, ctx): + if (random.randint(1, 2) == 2): + await ctx.reply("Donald trump sweeep") + else: + await ctx.reply("Kamala harris sweeep") async def on_ready(self): print("The big result plus bot is ready!") - for guild in self.guilds: - break await self.send_msg("Hurlo") - async def on_message(self, message): self.state = 0 roblox = discord.utils.get(self.emojis, name="roblos") await self.process_commands(message) fuckyou = message.content.lower() + channel_sent = message.channel + + if (self.snipe_active): + if (random.randint(1, 400) == 333): + saved = message.content + await channel_sent.send("BOOM :sunglasses: :fire:") + await message.delete() + time.sleep(2) + await channel_sent.send(saved) + self.snipe_active = False """ I want these statements moved into a function diff --git a/commands/funny.py b/commands/funny.py new file mode 100644 index 0000000..4766e33 --- /dev/null +++ b/commands/funny.py @@ -0,0 +1,40 @@ +from discord.ext import commands +import discord +import random +from main import client + + +class BigCommands: + @client.command(name="snipe") + async def snipe(self, ctx): + await ctx.reply("watch yourself") + pass + + @client.command(name="bigresult") + async def teach(self, ctx): + await ctx.reply( + "https://cdn.discordapp.com/attachments/427176475406630914/1302392181448900649/image.png?ex=6727f2bd&is=6726a13d&hm=6092f4fba06412feac26a16a6900bf6e6122d66506f60bfcc0bc7101ecede4db&") + + @client.command(name="mod") + async def mod(self, ctx): + await ctx.reply( + ">>> *pees in ur ass*\nI am a bot and this action was performed automatically. Please contact the modertators of this server if you have any questions or concerns.") + + @client.command(name="1984") + async def orwell(self, ctx): + if (random.randint(1, 5) == 2): + await ctx.reply(f">>> {ctx.author} has been warned: \n\nBad word usage") + else: + await ctx.reply( + "https://media.discordapp.net/attachments/865417026519957526/866575047459209236/video0-1-1.mov?ex=672d0e27&is=672bbca7&hm=3c80837685cb800ad817855b6463e4e1875dc009c6fc4540eff749c7387c4241&") + + @client.command(name="teachmethebigresult") + async def teachbigresult(self, ctx): + await ctx.reply("take b36 with Nick Cheng. join the 'Big Result' club") + + @client.command(name="ivotedfor") + async def voot(self, ctx): + if (random.randint(1, 2) == 2): + await ctx.reply("Donald trump sweeep") + else: + await ctx.reply("Kamala harris sweeep")
\ No newline at end of file @@ -1,4 +1,15 @@ +import os import discord import dotenv +from bigresult import BigResultPlus +import random +from discord.ext import commands +dotenv.load_dotenv() +TOKEN = os.getenv('TOKEN') +intents = discord.Intents.all() + +client = BigResultPlus(intents=intents, command_prefix="!") # This represents our connection with Discord + +client.run(TOKEN) # This actually starts our bot |
