diff options
| author | seth <[email protected]> | 2023-01-24 18:28:18 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2023-01-24 22:03:37 -0500 |
| commit | 5deaf0cc1580e13c48f3dbc7ff4c76d35640fcfc (patch) | |
| tree | 5c015a1a43bb6fc79c5ec4e264111abc006c8dd4 /src/teawie_bot | |
| parent | 95961b27a88230a22a74ae9de6cdd60d3beda95d (diff) | |
feat: moyaiBot -> teawieBot
Diffstat (limited to 'src/teawie_bot')
| -rw-r--r-- | src/teawie_bot/__init__.py | 9 | ||||
| -rw-r--r-- | src/teawie_bot/apis/guzzle.py | 20 | ||||
| -rw-r--r-- | src/teawie_bot/bot.py | 95 | ||||
| -rw-r--r-- | src/teawie_bot/copypastas/__init__.py | 0 | ||||
| -rw-r--r-- | src/teawie_bot/copypastas/dvd.txt | 1 | ||||
| -rw-r--r-- | src/teawie_bot/copypastas/egrill.txt | 1 | ||||
| -rw-r--r-- | src/teawie_bot/copypastas/happymeal.txt | 1 | ||||
| -rw-r--r-- | src/teawie_bot/copypastas/ismah.txt | 73 | ||||
| -rw-r--r-- | src/teawie_bot/copypastas/navyseal.txt | 1 | ||||
| -rw-r--r-- | src/teawie_bot/copypastas/sus.txt | 1 | ||||
| -rw-r--r-- | src/teawie_bot/copypastas/ticktock.txt | 8 | ||||
| -rw-r--r-- | src/teawie_bot/utils.py | 69 |
12 files changed, 279 insertions, 0 deletions
diff --git a/src/teawie_bot/__init__.py b/src/teawie_bot/__init__.py new file mode 100644 index 0000000..e3b5d8f --- /dev/null +++ b/src/teawie_bot/__init__.py @@ -0,0 +1,9 @@ +import os + +from .bot import bot + +TOKEN = os.getenv("TOKEN") + + +def main(): + bot.run(TOKEN) diff --git a/src/teawie_bot/apis/guzzle.py b/src/teawie_bot/apis/guzzle.py new file mode 100644 index 0000000..7599606 --- /dev/null +++ b/src/teawie_bot/apis/guzzle.py @@ -0,0 +1,20 @@ +import requests + +GUZZLE: str = "https://guzzle.gay/api" + + +def get_random_teawie() -> str: + resp: requests.Response + try: + resp = requests.get(GUZZLE + "/get_random_teawie", timeout=30) + except (requests.RequestException, requests.ConnectionError, + requests.HTTPError, requests.JSONDecodeError): + return "something went wrong :(" + if not resp.status_code == 200: + return "api request failed :(" + + try: + ret = resp.json()["url"] + except KeyError: + return "couldn't get url from api response :(" + return ret diff --git a/src/teawie_bot/bot.py b/src/teawie_bot/bot.py new file mode 100644 index 0000000..cb90804 --- /dev/null +++ b/src/teawie_bot/bot.py @@ -0,0 +1,95 @@ +import discord +from discord import app_commands +from discord.ext import commands + +from teawie_bot.apis import guzzle +from teawie_bot import utils + +SERVER_ID = discord.Object(id=1055663552679137310) +intents = discord.Intents.default() +intents.message_content = True # pylint: disable=assigning-non-slot +bot = commands.Bot(command_prefix="m!", + description="teawie time", + intents=intents) + + +async def on_ready(): + print(f"logged in as {bot.user}") + await bot.tree.sync(guild=SERVER_ID) + print("ready!") + + +async def on_message(message: discord.Message): + if message.author == bot.user: + return + + echo_messages = [ + "๐ฟ", + ] + echo_messages = echo_messages + utils.Teawies(bot).emojis + try: + index = echo_messages.index(message.content.lower()) + await message.channel.send(echo_messages[index]) + except ValueError: + pass + + await bot.process_commands(message) + + +async def ask(ctx: commands.Context): + await ctx.send(utils.get_random_response(bot, utils.Teawies(bot))) + + + name="ask", + description="ask lord teawie a question and they shall respond", + guild=SERVER_ID) +async def ask_slash_command(interaction: discord.Interaction): + msg = utils.get_random_response(bot, utils.Teawies(bot)) + while not msg: + msg = utils.get_random_response(bot, utils.Teawies(bot)) + await interaction.response.send_message(msg) + + +async def teawiespam(ctx: commands.Context): + if not discord.utils.get(bot.emojis, name="teawiesmile"): + return + msg = str() + for _ in range(50): + msg += str(discord.utils.get(bot.emojis, name="teawiesmile")) + + await ctx.send(msg) + + [email protected](name="copypasta", + description="send funni copypasta", + guild=SERVER_ID) +@app_commands.choices(choices=[ + app_commands.Choice(name="happymeal", value="happymeal"), + app_commands.Choice(name="ismah", value="ismah"), + app_commands.Choice(name="sus", value="sus"), + app_commands.Choice(name="ticktock", value="ticktock"), + app_commands.Choice(name="amongus_sus", value="amongus_sus"), + app_commands.Choice(name="egrill", value="egrill"), + app_commands.Choice(name="dvd", value="dvd"), +]) +async def copypasta(interaction: discord.Interaction, + choices: app_commands.Choice[str]): + msgs = utils.get_copypasta(choices.value) + for i, msg in enumerate(msgs): + if i == 0: + await interaction.response.send_message(msg) + else: + await interaction.channel.send(msg) + + [email protected](name="random_teawie", + description="get a random teawie!", + guild=SERVER_ID) +async def random_teawie(interaction: discord.Interaction): + msg = guzzle.get_random_teawie() + await interaction.response.send_message(msg) diff --git a/src/teawie_bot/copypastas/__init__.py b/src/teawie_bot/copypastas/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/teawie_bot/copypastas/__init__.py diff --git a/src/teawie_bot/copypastas/dvd.txt b/src/teawie_bot/copypastas/dvd.txt new file mode 100644 index 0000000..4c4e848 --- /dev/null +++ b/src/teawie_bot/copypastas/dvd.txt @@ -0,0 +1 @@ +Earlier today I was really horny, and I saw what I thought to be a blank DVD. I thought, DVDs have a tight hole, they might feel pretty good. So I put my soft pp into the hole of the DVD, and for a few seconds as I started getting harder, it felt pretty good, but then, once I was fully erect, it started being painful. My pp was stuck in the DVD, and I had to break it in half to get if out. It was then when I flipped the broken DVD over and realized that it was not a blank DVD, but a copy of the Pixar movie Up.. Well guys, guess I fucked up.
\ No newline at end of file diff --git a/src/teawie_bot/copypastas/egrill.txt b/src/teawie_bot/copypastas/egrill.txt new file mode 100644 index 0000000..d97e8ae --- /dev/null +++ b/src/teawie_bot/copypastas/egrill.txt @@ -0,0 +1 @@ +So the other day, I was playing rainbow six siege, and I heard one of my teammates make a callout in the voice chat. It was a real life gamer girl. God, I kid you not, I just stopped playing and pulled my dick out. โfuck, Fuck!โ I was yelling in voice chat. I just wanted to hear her voice again. โPlease,โ I moaned. But she left the lobby. I was crying and covered in my own cum, but I remembered that I could find recent teammates in the ubiplay friends tab. I frantically closed down siege and opened the tab, to find out she had TTV IN HER NAME!!! She was streaming, and only had 100 viewers!!! The competition was low, so I made the first move and donated my months rent to her. I was already about to pre. She read my donation in the chat. God this is the happiest Iโve been in a long time. I did a little research, and found out where she goes to school, but I am a little nervous to talk to her in person, and need support. Any advice before my Uber gets to her middle school?
\ No newline at end of file diff --git a/src/teawie_bot/copypastas/happymeal.txt b/src/teawie_bot/copypastas/happymeal.txt new file mode 100644 index 0000000..a186e78 --- /dev/null +++ b/src/teawie_bot/copypastas/happymeal.txt @@ -0,0 +1 @@ +OH MY GOD ITS 3 IN THE MORNING AND IM IN MCDONALDS AND WE JUST FOUND OUT THAT WHEN U PULL UP IN MCDONALDS AT 3 AM YOU CAN BUY THE AMONG US HAPPY MEAL WITH A TOY IN IT WHICH IS EITHER THE IMPOSTOR OR THE CREWMATE AND IF YOU DONT KNOW WHAT AMONG US IS YOU MUST BE MUST REALLY BE LIVING UNDER A ROCK ITS AN AWESOME GAME WITH IMPOSTORS AND CREWMATES AND BASICALLY THE IMPOSTOR TRIES TO SABOTAGE THE WHOLE GAME AND THE CREWMATES NEED TO STOP HIM BUT APPARENTLY WHEN YOU PURCHASE THE AMONG US HAPPY MEAL SOMETHING SCARY HAPPENS
\ No newline at end of file diff --git a/src/teawie_bot/copypastas/ismah.txt b/src/teawie_bot/copypastas/ismah.txt new file mode 100644 index 0000000..8d3a87f --- /dev/null +++ b/src/teawie_bot/copypastas/ismah.txt @@ -0,0 +1,73 @@ + +As an enlightened, modern parent, I try to be as involved as possible in the lives of my six children. I encourage them to join team sports. I attend their teen parties with them to ensure no drinking or alcohol is on the premises. I keep a fatherly eye on the CDs they listen to and the shows they watch, the company they keep and the books they read. You could say I'm a model parent. My children have never failed to make me proud, and I can say without the slightest embellishment that I have the finest family in the USA. +Two years ago, my wife Carol and I decided that our children's education would not be complete without some grounding in modern computers. To this end, we bought our children a brand new Compaq to learn with. The kids had a lot of fun using the handful of application programs we'd bought, such as Adobe's Photoshop and Microsoft's Word, and my wife and I were pleased that our gift was received so well. Our son Peter was most entranced by the device, and became quite a pro at surfing the net. When Peter began to spend whole days on the machine, I became concerned, but Carol advised me to calm down, and that it was only a passing phase. I was content to bow to her experience as a mother, until our youngest daughter, Cindy, charged into the living room one night to blurt out: "Peter is a computer hacker!" + + +As you can imagine, I was amazed. A computer hacker in my own house! I began to monitor my son's habits, to make certain that Cindy wasn't just telling stories, as she is prone to doing at times. + +After a few days of investigation, and some research into computer hacking, I confronted Peter with the evidence. I'm afraid to say, this was the only time I have ever been truly disappointed in one of my children. We raised them to be honest and to have integrity, and Peter betrayed the principles we tried to encourage in him, when he refused point blank to admit to his activities. His denials continued for hours, and in the end, I was left with no choice but to ban him from using the computer until he is old enough to be responsible for his actions. + +After going through this ordeal with my own family, I was left pondering how I could best help others in similar situations. I'd gained a lot of knowledge over those few days regarding hackers. It's only right that I provide that information to other parents, in the hope that they will be able to tell if their children are being drawn into the world of hacking. Perhaps other parents will be able to steer their sons back onto the straight and narrow before extreme measures need to be employed. + +To this end, I have decided to publish the top ten signs that your son is a hacker. I advise any parents to read this list carefully and if their son matches the profile, they should take action. A smart parent will first try to reason with their son, before resorting to groundings, or even spanking. I pride myself that I have never had to spank a child, and I hope this guide will help other parents to put a halt to their son's misbehaviour before a spanking becomes necessary. + +1. Has your son asked you to change ISPs? + + Most American families use trusted and responsible Internet Service Providers, such as AOL. These providers have a strict "No Hacking" policy, and take careful measures to ensure that your internet experience is enjoyable, educational and above all legal. If your child is becoming a hacker, one of his first steps will be to request a change to a more hacker friendly provider. + + I would advise all parents to refuse this request. One of the reasons your son is interested in switching providers is to get away from AOL's child safety filter. This filter is vital to any parent who wants his son to enjoy the internet without the endangering him through exposure to "adult" content. It is best to stick with the protection AOL provides, rather than using a home-based solution. If your son is becoming a hacker, he will be able to circumvent any home-based measures with surprising ease, using information gleaned from various hacker sites. + +2. Are you finding programs on your computer that you don't remember installing? + + Your son will probably try to install some hacker software. He may attempt to conceal the presence of the software in some way, but you can usually find any new programs by reading through the programs listed under "Install/Remove Programs" in your control panel. Popular hacker software includes "Comet Cursor", "Bonzi Buddy" and "Flash" . + + The best option is to confront your son with the evidence, and force him to remove the offending programs. He will probably try to install the software again, but you will be able to tell that this is happening, if your machine offers to "download" one of the hacker applications. If this happens, it is time to give your son a stern talking to, and possibly consider punishing him with a grounding. + +3. Has your child asked for new hardware? + + Computer hackers are often limited by conventional computer hardware. They may request "faster" video cards, and larger hard drives, or even more memory. If your son starts requesting these devices, it is possible that he has a legitimate need. You can best ensure that you are buying legal, trustworthy hardware by only buying replacement parts from your computer's manufacturer. + + If your son has requested a new "processor" from a company called "AMD", this is genuine cause for alarm. AMD is a third-world based company who make inferior, "knock-off" copies of American processor chips. They use child labor extensively in their third world sweatshops, and they deliberately disable the security features that American processor makers, such as Intel, use to prevent hacking. AMD chips are never sold in stores, and you will most likely be told that you have to order them from internet sites. Do not buy this chip! This is one request that you must refuse your son, if you are to have any hope of raising him well. + +4. Does your child read hacking manuals? + + If you pay close attention to your son's reading habits, as I do, you will be able to determine a great deal about his opinions and hobbies. Children are at their most impressionable in the teenage years. Any father who has had a seventeen year old daughter attempt to sneak out on a date wearing make up and perfume is well aware of the effect that improper influences can have on inexperienced minds. + + There are, unfortunately, many hacking manuals available in bookshops today. A few titles to be on the lookout for are: "Snow Crash" and "Cryptonomicon" by Neal Stephenson; "Neuromancer" by William Gibson; "Programming with Perl" by Timothy O'Reilly; "Geeks" by Jon Katz; "The Hacker Crackdown" by Bruce Sterling; "Microserfs" by Douglas Coupland; "Hackers" by Steven Levy; and "The Cathedral and the Bazaar" by Eric S. Raymond. + + If you find any of these hacking manuals in your child's possession, confiscate them immediately. You should also petition local booksellers to remove these titles from their shelves. You may meet with some resistance at first, but even booksellers have to bow to community pressure. + +5. How much time does your child spend using the computer each day? + + If your son spends more than thirty minutes each day on the computer, he may be using it to DOS other peoples sites. DOSing involves gaining access to the "command prompt" on other people's machines, and using it to tie up vital internet services. This can take up to eight hours. If your son is doing this, he is breaking the law, and you should stop him immediately. The safest policy is to limit your children's access to the computer to a maximum of forty-five minutes each day. + +6. Does your son use Quake? + + Quake is an online virtual reality used by hackers. It is a popular meeting place and training ground, where they discuss hacking and train in the use of various firearms. Many hackers develop anti-social tendencies due to the use of this virtual world, and it may cause erratic behaviour at home and at school. + + If your son is using Quake, you should make hime understand that this is not acceptable to you. You should ensure all the firearms in your house are carefully locked away, and have trigger locks installed. You should also bring your concerns to the attention of his school. + +7. Is your son becoming argumentative and surly in his social behaviour? + + As a child enters the electronic world of hacking, he may become disaffected with the real world. He may lose the ability to control his actions, or judge the rightness or wrongness of a course of behaviour. This will manifest itself soonest in the way he treats others. Those whom he disagrees with will be met with scorn, bitterness, and even foul language. He may utter threats of violence of a real or electronic nature. + + Even when confronted, your son will probably find it difficult to talk about this problem to you. He will probably claim that there is no problem, and that you are imagining things. He may tell you that it is you who has the problem, and you should "back off" and "stop smothering him." Do not allow yourself to be deceived. You are the only chance your son has, even if he doesn't understand the situation he is in. Keep trying to get through to him, no matter how much he retreats into himself. + +8. Is your son obsessed with "Lunix"? + + BSD, Lunix, Debian and Mandrake are all versions of an illegal hacker operation system, invented by a Soviet computer hacker named Linyos Torovoltos, before the Russians lost the Cold War. It is based on a program called "xenix", which was written by Microsoft for the US government. These programs are used by hackers to break into other people's computer systems to steal credit card numbers. They may also be used to break into people's stereos to steal their music, using the "mp3" program. Torovoltos is a notorious hacker, responsible for writing many hacker programs, such as "telnet", which is used by hackers to connect to machines on the internet without using a telephone. + + Your son may try to install "lunix" on your hard drive. If he is careful, you may not notice its presence, however, lunix is a capricious beast, and if handled incorrectly, your son may damage your computer, and even break it completely by deleting Windows, at which point you will have to have your computer repaired by a professional. + + If you see the word "LILO" during your windows startup (just after you turn the machine on), your son has installed lunix. In order to get rid of it, you will have to send your computer back to the manufacturer, and have them fit a new hard drive. Lunix is extremely dangerous software, and cannot be removed without destroying part of your hard disk surface. + +9. Has your son radically changed his appearance? + + If your son has undergone a sudden change in his style of dress, you may have a hacker on your hands. Hackers tend to dress in bright, day-glo colors. They may wear baggy pants, bright colored shirts and spiky hair dyed in bright colors to match their clothes. They may take to carrying "glow-sticks" and some wear pacifiers around their necks. (I have no idea why they do this) There are many such hackers in schools today, and your son may have started to associate with them. If you notice that your son's group of friends includes people dressed like this, it is time to think about a severe curfew, to protect him from dangerous influences. + +10. Is your son struggling academically? + + If your son is failing courses in school, or performing poorly on sports teams, he may be involved in a hacking group, such as the infamous "Otaku" hacker association. Excessive time spent on the computer, communicating with his fellow hackers may cause temporary damage to the eyes and brain, from the electromagnetic radiation. This will cause his marks to slip dramatically, particularly in difficult subjects such as Math, and Chemistry. In extreme cases, over-exposure to computer radiation can cause schizophrenia, meningitis and other psychological diseases. Also, the reduction in exercise may cause him to lose muscle mass, and even to start gaining weight. For the sake of your child's mental and physical health, you must put a stop to his hacking, and limit his computer time drastically. + + +I encourage all parents to read through this guide carefully. Your child's future may depend upon it. Hacking is an illegal and dangerous activity, that may land your child in prison, and tear your family apart. It cannot be taken too seriously. diff --git a/src/teawie_bot/copypastas/navyseal.txt b/src/teawie_bot/copypastas/navyseal.txt new file mode 100644 index 0000000..cb8eb67 --- /dev/null +++ b/src/teawie_bot/copypastas/navyseal.txt @@ -0,0 +1 @@ +What the fuck did you just fucking say about me, you little bitch? Iโll have you know I graduated top of my class in the Navy Seals, and Iโve been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills. I am trained in gorilla warfare and Iโm the top sniper in the entire US armed forces. You are nothing to me but just another target. I will wipe you the fuck out with precision the likes of which has never been seen before on this Earth, mark my fucking words. You think you can get away with saying that shit to me over the Internet? Think again, fucker. As we speak I am contacting my secret network of spies across the USA and your IP is being traced right now so you better prepare for the storm, maggot. The storm that wipes out the pathetic little thing you call your life. Youโre fucking dead, kid. I can be anywhere, anytime, and I can kill you in over seven hundred ways, and thatโs just with my bare hands. Not only am I extensively trained in unarmed combat, but I have access to the entire arsenal of the United States Marine Corps and I will use it to its full extent to wipe your miserable ass off the face of the continent, you little shit. If only you could have known what unholy retribution your little โcleverโ comment was about to bring down upon you, maybe you would have held your fucking tongue. But you couldnโt, you didnโt, and now youโre paying the price, you goddamn idiot. I will shit fury all over you and you will drown in it. Youโre fucking dead, kiddo.
\ No newline at end of file diff --git a/src/teawie_bot/copypastas/sus.txt b/src/teawie_bot/copypastas/sus.txt new file mode 100644 index 0000000..a381e3e --- /dev/null +++ b/src/teawie_bot/copypastas/sus.txt @@ -0,0 +1 @@ +HOLY SHIT DID YOU JUST SAY THE WORD SUS???๐ณ1?/1๐ฑ//1๐ณ/1111!!!! Wait, you don't know what it is from?๐ณ๐ณ๐ณLet ๐give you a brief r/history. ๐๐๐๐จโ๐If you didn't r/knowyourshit, the r/term sus(suspicious) is a saying from the r/popular r/game r/AmongUs. Among us is so fun๐ ๐๐, don't insult it, every youtuber and streamer says so!!!!!!!11 Corpses voice is so deep am i right or am i right๐ณ๐ณ????? I mean Mr beast and Dream play and pull big ๐ง 1000000000000 iq moves in their videos..... YOU WERE THE IMPOSTER.... เถ เถ เถ Get it because you don't know what sus means? r/stupidquestions r/youranidot r/stupidcuck. I CAnT BELEeVE YOUU dont KNoW WHT SUS MeaNS?/??!??!?!!๐๐๐๐๐ Man why do i have to r/explain this to a r/idiot๐คช๐คช๐คช๐๐๐... Sus is a GREAT WORD from a GREAT VIDEO GAME. in class, YOU CAN PLAY IT ON YOUR PHONE๐๐๐๐๐๐??!?!? such a masterpiece... FOR THE GREAT PRICE OF FREE!!!11!๐ฐ๐ฐ๐ค๐ค๐ค๐ค๐๐๐๐ฐ๐ฐ It can also mean gay ๐ณ๐ณ๐ณ๐ณ
\ No newline at end of file diff --git a/src/teawie_bot/copypastas/ticktock.txt b/src/teawie_bot/copypastas/ticktock.txt new file mode 100644 index 0000000..22beb4a --- /dev/null +++ b/src/teawie_bot/copypastas/ticktock.txt @@ -0,0 +1,8 @@ +Tick-tock +Heavy like a Brinks truck +Looking like I'm tip-top +Shining like a wristwatch +Time will grab your wrist +Lock it down 'til the thing pop +Can you stick around for a minute 'til the ring stop? +Please, God
\ No newline at end of file diff --git a/src/teawie_bot/utils.py b/src/teawie_bot/utils.py new file mode 100644 index 0000000..99f2a13 --- /dev/null +++ b/src/teawie_bot/utils.py @@ -0,0 +1,69 @@ +import importlib.resources +import random +from math import ceil + +from discord.ext import commands +import discord + +from teawie_bot import copypastas + +CHAR_LIMIT: int = 2000 + + +class Teawies: + """ + wrapper class around list[discord.Emoji] + """ + + def __init__(self, bot: commands.Bot): + names = [ + "teawiecry", "teawiederp", "teawiedizzy", + "teawienerdcroppedanddownsized", "teawieneutral", "teawiepet", + "teawiepetfast", "teawiepop", "teawiesmile", "teawiesmug", + "teawiestarstruck", "tei", "wavy", "wie", "wie~1", + "manythoughtsheadfull" + ] + + self.emojis: list[str] = [] + for name in names: + emoji = discord.utils.get(bot.emojis, name=name) + if emoji: + self.emojis.append(str(emoji)) + + def random(self) -> str: + return random.choice(self.emojis) + + +def get_random_response(bot: commands.Bot, teawies: Teawies) -> str: + responses = [ + "soon", "maybe", "perhaps", "elaborate", + str(discord.utils.get(bot.emojis, name="moyai")), + ] + responses = responses + teawies.emojis + return random.choice(responses) + + +def split_msg(msg: str) -> list[str]: + """ + splits a message into multiple parts so that it + can fit into the discord character limit + """ + split = ceil(len(msg) / ceil(len(msg) / CHAR_LIMIT)) + return [msg[i:i + split] for i in range(0, len(msg), split)] + + +def get_copypasta(name: str) -> list[str]: + try: + res = importlib.resources.read_text(copypastas, name + ".txt") + except OSError: + return ["something went wrong :("] + + if res == "": + return [f"couldn't send copypasta: {name} :("] + + if len(res) >= CHAR_LIMIT: + res = split_msg(res) + else: + res = [res] + + return res |
