Skip to content

Instantly share code, notes, and snippets.

View NotSoSuper's full-sized avatar
🥓
test

NotSoSuper

🥓
test
View GitHub Profile
@NotSoSuper
NotSoSuper / numbers.txt
Last active March 30, 2024 22:36
almost all the police numbers in the U.S (to blacklist from calling services) prefix: +1
423-279-3200
440-564-7014
845-677-7300
904-266-4468
315-393-1555
918-423-5858
440-293-4555
701-577-1212
765-584-6891
863-291-5200
@NotSoSuper
NotSoSuper / help.lua
Last active October 25, 2023 16:04
NotSoBot Help Documentation
Complete command list of NotSoBot <439205512425504771>:
Owner: NotSoSuper <296044494812479498>
Prefix: .
* = Not Required
^ = Bot Owner Only
^^ = Server Admin Only
"/'s" in commands show aliases for the command (Ex: ".reverse/r <text>" Command can be run with .reverse or .r)
<max_messages> = The number of messages to search through
<image> = The image URL, @discord_user, the users name, discord/custom emoji, or, nothing inputted which will search through 25 messages for embeds or attachments
<image-face> = Image requires a HUMAN FACE to be included
@NotSoSuper
NotSoSuper / numbers.txt
Created January 2, 2018 03:45
almost all the police numbers in the U.S (to blacklist from calling services)
423-279-3200
440-564-7014
845-677-7300
904-266-4468
315-393-1555
918-423-5858
440-293-4555
701-577-1212
765-584-6891
863-291-5200
local function getMyself(serverConnectionHandlerID)
-- Get Self ID
local myClientID, error = ts3.getClientID(serverConnectionHandlerID)
if error ~= ts3errors.ERROR_ok then
print("Error getting own client ID: " .. error)
return
end
if myClientID == 0 then
ts3.printMessageToCurrentTab("Not connected")
return
@NotSoSuper
NotSoSuper / get_images.py
Last active July 23, 2021 01:05
Get Images/Gifs in Discord for commands.
image_mimes = ['image/png', 'image/pjpeg', 'image/jpeg', 'image/x-icon']
async def isimage(url:str):
try:
with aiohttp.ClientSession() as session:
with aiohttp.Timeout(30):
async with session.get(url) as resp:
if resp.status == 200:
mime = resp.headers.get('Content-type', '').lower()
if any([mime == x for x in image_mimes]):
return True
def do_gmagik(self, ctx, gif):
try:
try:
gif = PIL.Image.open(gif)
except:
return '\N{WARNING SIGN} Invalid Gif.'
if gif.size >= (3000, 3000):
return '\N{WARNING SIGN} `GIF resolution exceeds maximum >= (3000, 3000).`'
elif gif.n_frames > 150 and ctx.message.author.id != self.bot.owner.id:
return "\N{WARNING SIGN} `GIF has too many frames (> 150 Frames).`"
@NotSoSuper
NotSoSuper / funcs.py
Created December 1, 2016 20:22
some utility functions for discord bots
import asyncio
import discord
import aiohttp
import re
import aiohttp
import random
import sys
import os
import aiosocks
import time
@NotSoSuper
NotSoSuper / docker-compose.yml
Created November 29, 2018 02:46
custom dockprom
version: '2.1'
services:
prometheus:
image: prom/prometheus:v2.5.0
container_name: prometheus
volumes:
- ./prometheus/:/etc/prometheus/
- ./data/prometheus/:/prometheus/
import os
cows = os.listdir('/usr/share/cowsay/cows')
base = r"""
@commands.command(aliases=['{0}'])
async def {1}say(self, *, txt:str):
msg = await self.do_cowsay(txt, '{0}')
await self.bot.say("```\n"+msg[:1992]+"```")
"""
@commands.command(pass_context=True)
@commands.cooldown(2, 5, commands.BucketType.server)
@checks.bot_has_perm(add_reactions=True)
async def react(self, ctx, *, txt:str):
msg = None
channel = ctx.message.channel
for c in ctx.message.channel_mentions:
channel = c
txt = txt.replace(c.mention, '')
if not channel.is_private: