Skip to content

Instantly share code, notes, and snippets.

@sgmedev
sgmedev / 1. unregister_commands.py
Last active May 16, 2026 05:14
Script to unregister Discord application commands
#!/usr/bin/python3
"""Script to unregister discord application commands"""
import sys
from getpass import getpass
from time import sleep
import requests
verbose = "-v" in sys.argv
application_id = input("Application ID: ")
@sgmedev
sgmedev / Nick moderator.py
Last active December 18, 2022 04:31
A simple discord bot that will moderate nick names
TOKEN = "" # Your bot's token
BAD_NICKS = (,) # Iterable of nicks to censor
ALERT_CHANNEL = # ID of channel you want to send alerts to
MESSAGE = "%mention Please refrain from setting your nick to anything that breaks server rules continuing to do this may result in punishment." # Alert message (%mention will be replaced with user mention)
DELETE_AFTER = 30 # Time until it deletes alert message after sending it
import discord
intents = discord.Intents.default()