2023-03-09 22:01:10 +00:00
|
|
|
import datetime
|
|
|
|
import math
|
|
|
|
import platform
|
2018-12-23 13:48:15 +00:00
|
|
|
import random
|
2023-04-02 11:56:49 +00:00
|
|
|
from typing import Optional
|
2023-03-09 22:01:10 +00:00
|
|
|
|
2018-12-23 13:48:15 +00:00
|
|
|
import discord
|
|
|
|
from discord.ext import commands
|
2019-02-28 22:10:30 +00:00
|
|
|
from discord.ext.commands import Cog
|
2023-03-09 22:01:10 +00:00
|
|
|
|
|
|
|
from robocop_ng.helpers.checks import check_if_staff_or_ot
|
2018-12-23 13:48:15 +00:00
|
|
|
|
|
|
|
|
2019-02-28 22:10:30 +00:00
|
|
|
class Meme(Cog):
|
2018-12-23 13:48:15 +00:00
|
|
|
"""
|
|
|
|
Meme commands.
|
|
|
|
"""
|
|
|
|
|
|
|
|
def __init__(self, bot):
|
|
|
|
self.bot = bot
|
|
|
|
|
2018-12-23 21:12:06 +00:00
|
|
|
def c_to_f(self, c):
|
|
|
|
"""this is where we take memes too far"""
|
2018-12-26 07:18:05 +00:00
|
|
|
return math.floor(9.0 / 5.0 * c + 32)
|
2018-12-23 13:48:15 +00:00
|
|
|
|
2018-12-24 00:18:40 +00:00
|
|
|
def c_to_k(self, c):
|
|
|
|
"""this is where we take memes REALLY far"""
|
2018-12-26 07:18:05 +00:00
|
|
|
return math.floor(c + 273.15)
|
2018-12-24 00:18:40 +00:00
|
|
|
|
2018-12-23 13:48:15 +00:00
|
|
|
@commands.check(check_if_staff_or_ot)
|
|
|
|
@commands.command(hidden=True, name="warm")
|
2023-04-02 11:56:49 +00:00
|
|
|
async def warm_member(self, ctx, user: Optional[discord.Member]):
|
2018-12-23 13:48:15 +00:00
|
|
|
"""Warms a user :3"""
|
2023-04-02 11:56:49 +00:00
|
|
|
if user is None and ctx.message.reference is None:
|
|
|
|
celsius = random.randint(15, 20)
|
|
|
|
fahrenheit = self.c_to_f(celsius)
|
|
|
|
kelvin = self.c_to_k(celsius)
|
|
|
|
await ctx.send(
|
|
|
|
f"{ctx.author.mention} tries to warm themself."
|
|
|
|
f" User is now {celsius}°C "
|
|
|
|
f"({fahrenheit}°F, {kelvin}K).\n"
|
|
|
|
"You might have more success warming someone else :3"
|
|
|
|
)
|
|
|
|
else:
|
|
|
|
if user is None:
|
|
|
|
user = ctx.channel.fetch_message(
|
|
|
|
ctx.message.reference.message_id
|
|
|
|
).author
|
|
|
|
|
|
|
|
celsius = random.randint(15, 100)
|
|
|
|
fahrenheit = self.c_to_f(celsius)
|
|
|
|
kelvin = self.c_to_k(celsius)
|
|
|
|
await ctx.send(
|
|
|
|
f"{user.mention} warmed."
|
|
|
|
f" User is now {celsius}°C "
|
|
|
|
f"({fahrenheit}°F, {kelvin}K)."
|
|
|
|
)
|
2018-12-23 21:12:06 +00:00
|
|
|
|
2018-12-26 08:18:11 +00:00
|
|
|
@commands.check(check_if_staff_or_ot)
|
|
|
|
@commands.command(hidden=True, name="chill", aliases=["cold"])
|
2023-04-02 11:56:49 +00:00
|
|
|
async def chill_member(self, ctx, user: Optional[discord.Member]):
|
2018-12-26 08:18:11 +00:00
|
|
|
"""Chills a user >:3"""
|
2023-04-02 11:56:49 +00:00
|
|
|
if user is None and ctx.message.reference is None:
|
|
|
|
celsius = random.randint(-75, 10)
|
|
|
|
fahrenheit = self.c_to_f(celsius)
|
|
|
|
kelvin = self.c_to_k(celsius)
|
|
|
|
await ctx.send(
|
|
|
|
f"{ctx.author.mention} chills themself."
|
|
|
|
f" User is now {celsius}°C "
|
|
|
|
f"({fahrenheit}°F, {kelvin}K).\n"
|
|
|
|
"🧊 Don't be so hard on yourself. 😔"
|
|
|
|
)
|
|
|
|
else:
|
|
|
|
if user is None:
|
|
|
|
user = ctx.channel.fetch_message(
|
|
|
|
ctx.message.reference.message_id
|
|
|
|
).author
|
|
|
|
celsius = random.randint(-50, 15)
|
|
|
|
fahrenheit = self.c_to_f(celsius)
|
|
|
|
kelvin = self.c_to_k(celsius)
|
|
|
|
await ctx.send(
|
|
|
|
f"{user.mention} chilled."
|
|
|
|
f" User is now {celsius}°C "
|
|
|
|
f"({fahrenheit}°F, {kelvin}K)."
|
|
|
|
)
|
2018-12-26 08:18:11 +00:00
|
|
|
|
2019-01-08 22:52:57 +00:00
|
|
|
@commands.check(check_if_staff_or_ot)
|
|
|
|
@commands.command(hidden=True, aliases=["thank", "reswitchedgold"])
|
2023-04-02 11:56:49 +00:00
|
|
|
async def gild(self, ctx, user: Optional[discord.Member]):
|
2019-01-08 22:53:21 +00:00
|
|
|
"""Gives a star to a user"""
|
2023-04-02 11:56:49 +00:00
|
|
|
if user is None and ctx.message.reference is None:
|
|
|
|
await ctx.send(f"No stars for you, {ctx.author.mention}!")
|
|
|
|
else:
|
|
|
|
if user is None:
|
|
|
|
user = ctx.channel.fetch_message(
|
|
|
|
ctx.message.reference.message_id
|
|
|
|
).author
|
|
|
|
await ctx.send(f"{user.mention} gets a :star:, yay!")
|
2019-01-08 22:52:57 +00:00
|
|
|
|
2019-02-22 21:56:14 +00:00
|
|
|
@commands.check(check_if_staff_or_ot)
|
2020-04-20 22:05:32 +00:00
|
|
|
@commands.command(
|
|
|
|
hidden=True, aliases=["reswitchedsilver", "silv3r", "reswitchedsilv3r"]
|
|
|
|
)
|
2023-04-02 11:56:49 +00:00
|
|
|
async def silver(self, ctx, user: Optional[discord.Member]):
|
2019-02-22 21:56:14 +00:00
|
|
|
"""Gives a user ReSwitched Silver™"""
|
2023-04-02 11:56:49 +00:00
|
|
|
if user is None and ctx.message.reference is None:
|
|
|
|
await ctx.send(f"{ctx.author.mention}, you can't reward yourself.")
|
|
|
|
else:
|
|
|
|
if user is None:
|
|
|
|
user = ctx.channel.fetch_message(
|
|
|
|
ctx.message.reference.message_id
|
|
|
|
).author
|
2020-04-20 22:05:32 +00:00
|
|
|
embed = discord.Embed(
|
|
|
|
title="ReSwitched Silver™!",
|
|
|
|
description=f"Here's your ReSwitched Silver™," f"{user.mention}!",
|
|
|
|
)
|
|
|
|
embed.set_image(
|
2020-05-17 20:44:15 +00:00
|
|
|
url="https://cdn.discordapp.com/emojis/548623626916724747.png?v=1"
|
2020-04-20 22:05:32 +00:00
|
|
|
)
|
2019-02-23 21:13:00 +00:00
|
|
|
await ctx.send(embed=embed)
|
2019-02-22 21:56:14 +00:00
|
|
|
|
2018-12-29 19:22:15 +00:00
|
|
|
@commands.check(check_if_staff_or_ot)
|
|
|
|
@commands.command(hidden=True)
|
|
|
|
async def btwiuse(self, ctx):
|
|
|
|
"""btw i use arch"""
|
|
|
|
uname = platform.uname()
|
2020-04-20 22:05:32 +00:00
|
|
|
await ctx.send(
|
|
|
|
f"BTW I use {platform.python_implementation()} "
|
|
|
|
f"{platform.python_version()} on {uname.system} "
|
|
|
|
f"{uname.release}"
|
|
|
|
)
|
2018-12-29 19:22:15 +00:00
|
|
|
|
2018-12-26 08:18:11 +00:00
|
|
|
@commands.check(check_if_staff_or_ot)
|
|
|
|
@commands.command(hidden=True)
|
|
|
|
async def yahaha(self, ctx):
|
|
|
|
"""secret command"""
|
|
|
|
await ctx.send(f"🍂 you found me 🍂")
|
|
|
|
|
2019-11-05 09:43:17 +00:00
|
|
|
@commands.check(check_if_staff_or_ot)
|
|
|
|
@commands.command(hidden=True)
|
|
|
|
async def blackalabi(self, ctx):
|
|
|
|
"""secret command"""
|
|
|
|
await ctx.send("https://elixi.re/i/discord.png")
|
|
|
|
|
2018-12-29 19:11:22 +00:00
|
|
|
@commands.check(check_if_staff_or_ot)
|
|
|
|
@commands.command(hidden=True)
|
|
|
|
async def peng(self, ctx):
|
|
|
|
"""heck tomger"""
|
|
|
|
await ctx.send(f"🐧")
|
|
|
|
|
2018-12-29 03:32:17 +00:00
|
|
|
@commands.check(check_if_staff_or_ot)
|
|
|
|
@commands.command(hidden=True, aliases=["outstanding"])
|
|
|
|
async def outstandingmove(self, ctx):
|
|
|
|
"""Posts the outstanding move meme"""
|
2020-04-20 22:05:32 +00:00
|
|
|
await ctx.send(
|
|
|
|
"https://cdn.discordapp.com/attachments"
|
|
|
|
"/371047036348268545/528413677007929344"
|
|
|
|
"/image0-5.jpg"
|
|
|
|
)
|
2018-12-29 03:32:17 +00:00
|
|
|
|
2018-12-26 08:22:22 +00:00
|
|
|
@commands.check(check_if_staff_or_ot)
|
|
|
|
@commands.command(hidden=True)
|
|
|
|
async def bones(self, ctx):
|
2020-05-17 20:44:15 +00:00
|
|
|
await ctx.send("https://cdn.discordapp.com/emojis/443501365843591169.png?v=1")
|
2018-12-26 08:22:22 +00:00
|
|
|
|
2019-01-10 12:46:15 +00:00
|
|
|
@commands.check(check_if_staff_or_ot)
|
|
|
|
@commands.command(hidden=True)
|
|
|
|
async def headpat(self, ctx):
|
2020-05-17 20:44:15 +00:00
|
|
|
await ctx.send("https://cdn.discordapp.com/emojis/465650811909701642.png?v=1")
|
2019-01-10 12:46:15 +00:00
|
|
|
|
2019-01-10 12:48:46 +00:00
|
|
|
@commands.check(check_if_staff_or_ot)
|
2020-04-20 22:05:32 +00:00
|
|
|
@commands.command(
|
|
|
|
hidden=True, aliases=["when", "etawhen", "emunand", "emummc", "thermosphere"]
|
|
|
|
)
|
2019-01-10 12:48:46 +00:00
|
|
|
async def eta(self, ctx):
|
|
|
|
await ctx.send("June 15.")
|
|
|
|
|
2018-12-23 21:12:06 +00:00
|
|
|
@commands.check(check_if_staff_or_ot)
|
|
|
|
@commands.command(hidden=True, name="bam")
|
2023-04-02 11:56:49 +00:00
|
|
|
async def bam_member(self, ctx, target: Optional[discord.Member]):
|
2018-12-23 21:12:06 +00:00
|
|
|
"""Bams a user owo"""
|
2023-04-02 11:56:49 +00:00
|
|
|
if target is None and ctx.message.reference is None:
|
|
|
|
await ctx.reply("https://tenor.com/view/bonk-gif-26414884")
|
|
|
|
else:
|
|
|
|
if target is None:
|
|
|
|
target = ctx.channel.fetch_message(
|
|
|
|
ctx.message.reference.message_id
|
|
|
|
).author
|
|
|
|
if target == ctx.author:
|
|
|
|
if target.id == 181627658520625152:
|
|
|
|
return await ctx.send(
|
|
|
|
"https://cdn.discordapp.com/attachments/286612533757083648/403080855402315796/rehedge.PNG"
|
|
|
|
)
|
|
|
|
return await ctx.send("hedgeberg#7337 is ̶n͢ow b̕&̡.̷ 👍̡")
|
|
|
|
elif target == self.bot.user:
|
2020-04-20 22:05:32 +00:00
|
|
|
return await ctx.send(
|
2023-04-02 11:56:49 +00:00
|
|
|
f"I'm sorry {ctx.author.mention}, I'm afraid I can't do that."
|
2020-04-20 22:05:32 +00:00
|
|
|
)
|
2019-09-18 21:19:05 +00:00
|
|
|
|
2023-04-02 11:56:49 +00:00
|
|
|
safe_name = await commands.clean_content(escape_markdown=True).convert(
|
|
|
|
ctx, str(target)
|
|
|
|
)
|
|
|
|
await ctx.send(f"{safe_name} is ̶n͢ow b̕&̡.̷ 👍̡")
|
2018-12-23 13:48:15 +00:00
|
|
|
|
2018-12-23 14:28:44 +00:00
|
|
|
@commands.command(hidden=True)
|
|
|
|
async def memebercount(self, ctx):
|
|
|
|
"""Checks memeber count, as requested by dvdfreitag"""
|
|
|
|
await ctx.send("There's like, uhhhhh a bunch")
|
|
|
|
|
2018-12-23 13:48:15 +00:00
|
|
|
@commands.command(hidden=True)
|
|
|
|
async def frolics(self, ctx):
|
|
|
|
"""test"""
|
|
|
|
await ctx.send("https://www.youtube.com/watch?v=VmarNEsjpDI")
|
|
|
|
|
2020-10-02 00:03:41 +00:00
|
|
|
@commands.command(
|
|
|
|
hidden=True,
|
|
|
|
aliases=[
|
|
|
|
"yotld",
|
|
|
|
"yold",
|
|
|
|
"yoltd",
|
|
|
|
"yearoflinuxondesktop",
|
|
|
|
"yearoflinuxonthedesktop",
|
|
|
|
],
|
|
|
|
)
|
2019-08-12 10:09:36 +00:00
|
|
|
async def yearoflinux(self, ctx):
|
|
|
|
"""Shows the year of Linux on the desktop"""
|
2020-04-20 22:05:32 +00:00
|
|
|
await ctx.send(
|
2020-05-17 20:44:15 +00:00
|
|
|
f"{datetime.datetime.now().year} is the year of Linux on the Desktop"
|
2020-04-20 22:05:32 +00:00
|
|
|
)
|
2019-08-12 10:09:36 +00:00
|
|
|
|
2018-12-23 13:48:15 +00:00
|
|
|
|
2022-05-24 18:35:42 +00:00
|
|
|
async def setup(bot):
|
|
|
|
await bot.add_cog(Meme(bot))
|