from discord.ext import commands
from discord import Embed, Color
from random import randint as ri
from asyncio import sleep as sl
@bot.command(name="rainbow")
async def rainbow_cmd(ctx):
emb = discord.Embed(title="Rainbow time 🕺")
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import discord | |
def ask( | |
bot: discord.ext.commands.Bot, | |
ctx: discord.ext.commands.Context, | |
question: str, | |
timeout: float = 30.0, | |
target_user: discord.Member = None, | |
target_location: Union[discord.TextChannel, discord.Member] = None, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import termcolor | |
import random | |
import os | |
import time | |
space_stuffs = { | |
"star": "✦", | |
"backtick": "`", | |
"dot": ".", | |
"comma": ",", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requirements pynput module | |
from pynput.keyboard import Listener, Key | |
def on_press(key): | |
print(key + " was pressed") | |
with Listener(on_press=on_press) as listener: | |
listener.join() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# REQUIREMENTS -> data.json FILE | |
# REQUIREMENTS -> REQUESTS MODULE | |
# REQUIREMENTS -> JSON MODULE | |
# REQUIREMENTS -> SYS MODULE | |
# REQUIREMENTS (OPTIONAL) -> COLORAMA MODULE | |
# REQUIREMENT -> A ROBLOX GROUP ID | |
GROUP_IDENTIFIER_ID = #Insert integer group ID here | |
import requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requirements | |
# - A DB | |
# - A venv w/ sqlalchemy & requests | |
from sqlalchemy import create_engine, Column, Integer, String, ForeignKey | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy.orm import sessionmaker, relationships | |
import requests | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import requests | |
import discord | |
from discord import Webhook, RequestsWebhookAdapter | |
def sendhook(url): | |
hookLink = requests.get(url).json() | |
hookId = hookLink['id'] | |
hookToken = hookLink['token'] | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
def psaCheck(uid) -> str: | |
# A list of all valid NHC group | |
allGroups = ['mayflower department of justice','new haven county transit authority','mayflower national guard','mayflower public broadcasting service','mayflower state legislature','mayflower parks and wildlife department','lander police department','mayflower state police','mayflower courts','plymouth police department','new haven county fire department','new haven county sherrifs office'] | |
userGroups = getGroups(uid) # The dictionary of all a users' groups | |
counter = 0 # <- Keeps track of the number of violations | |
for group in list(userGroups.keys()): | |
# The keys are all the group names |