Skip to content

Instantly share code, notes, and snippets.

View 8dcc's full-sized avatar
™️
™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️

​8dcc​ 8dcc

™️
™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️™️
View GitHub Profile
@8dcc
8dcc / discord-ban-bot.py
Last active September 25, 2021 01:31 — forked from vivekjoshy/discord-ban-bot.py
Script to ban members from a discord server.
#!/usr/bin/python
"""
# WARNING!
# DO not use this script for malicious purposes!
# Author: daegontaven - taven#0001
# License: Public Domain
# README
# I have resigned from using discord indefinitely to pursue schoolwork.
# As such I will not be maintaining this script anymore.
@8dcc
8dcc / discord_purge.py
Created September 9, 2021 20:31
Discord bot purge 1
# https://github.com/r4v10l1/discord-bot
#----------------------------------------------------------------
# Purge commands
@client.command(aliases=["clean"])
@commands.check_any(commands.is_owner(), check_waifu(), check_server_owner())
async def purge(ctx, member : discord.Member, amount : int):
if amount <= 0:
await ctx.send(':warning: **Missing required arguments. Usage:** `n!purge <username> <message_amount>`')
debug_print('[Bot] Could not parse negative integer for user: %s' % ctx.author)
@8dcc
8dcc / discord_purge2.py
Created September 9, 2021 20:42
Discord bot purge 2
# https://github.com/r4v10l1/discord-bot
#----------------------------------------------------------------
# Purge commands
@client.command(aliases=["clean"])
@commands.check_any(commands.is_owner(), check_waifu(), check_server_owner())
async def purge(ctx, member : discord.Member, amount : int):
def check_purge(check_me):
return check_me.author.id == member.id
@8dcc
8dcc / discord_purge3.py
Created September 10, 2021 11:18
Discord bot purge 3. Checking custom string but not nicknames.
# https://github.com/r4v10l1/discord-bot
#----------------------------------------------------------------
# Purge commands
@client.command(aliases=["clean"])
@commands.check_any(commands.is_owner(), check_waifu(), check_server_owner())
async def purge(ctx, member : str, amount : int):
if str(member) == "self":
member = ctx.author
@8dcc
8dcc / delete_lines.py
Created September 13, 2021 11:08
Delete a number of lines from the terminal with sys
import sys
lines_to_delete = 3
for line in range(lines_to_delete):
CURSOR_UP_ONE = '\x1b[1A'
ERASE_LINE = '\x1b[2K'
sys.stdout.write(CURSOR_UP_ONE)
sys.stdout.write(ERASE_LINE)
@8dcc
8dcc / check_inactive.py
Last active September 25, 2021 01:29
Check if the bot is alone in a channel for X secconds.
# https://github.com/r4v10l1/discord-bot/
# ----------------------------------------------------------------
import discord, asyncio
from discord.ext import commands
from dotenv import load_dotenv
@client.command()
async def join(ctx): # Command where the bot joins for example
@8dcc
8dcc / block_inspect.js
Created September 27, 2021 21:41
Block inspect shortcuts and right click
document.addEventListener('contextmenu', function(e) {
e.preventDefault();
});
document.onkeydown = function(e) {
if(event.keyCode == 123) {
alert(":^)")
return false;
}
if(e.ctrlKey && e.shiftKey && e.keyCode == 'I'.charCodeAt(0)) {
alert(":^)")
@8dcc
8dcc / 4chan.css
Created September 29, 2021 13:40
Custom 4chan css. Fuck stylish.
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 400;
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v10/ODelI1aHBYDBqgeIAH2zlNV_2ngZ8dMf8fLgjYEouxg.woff2) format('woff2');
}
body {
background: #1c1c1c;
color: #C3C3C3;
font-family: 'Source Sans Pro', sans-serif;
@8dcc
8dcc / custom-scrollbar.css
Created September 29, 2021 14:40
Custom scrollbar for html
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
background: #999;
@8dcc
8dcc / stringToCamelCase.py
Created October 6, 2021 16:51
Convert string to camel case
import re
def to_camel_case(text):
result = ""
first = True
if ("-" in text) or ("_" in text):
for word in re.findall(r"[a-zA-Z0-9]+", text):
if first:
result = result + word