Skip to content

Instantly share code, notes, and snippets.

View royalPanic's full-sized avatar
🐍
Come here often?

Brendon Barnes royalPanic

🐍
Come here often?
View GitHub Profile

Auto-Moderating a Discord Server with Dyno

By royal.Panic#4515


Introduction:

This document serves as a simple guide to teach new server owners how to use the Dyno Discord bot to auto-moderate their servers.

Why Auto-Moderate?

Any server owner who's been on Discord or any other community platform is probably familiar with the concept of raids. Raids are when one or more users join a server with the intent of harassing its users, usually to the point of making them leave the server. Raiders usually accomplish this by rapidly spamming messages, and the content of the messages can very from everything to plain text and user or everyone pings all the way to gore and sexually explicit images. While the best defense for raids is active community moderators, it usually happens that there are certain hours when next to no one is on. This is when most raiders choose to strike. This means that the next best thing is to have a bot on your server that can act in the absence of yo

@royalPanic
royalPanic / bot.py
Created June 10, 2019 11:55
Basic Discord.py Bot
import discord
from discord.ext import commands
import aiohttp
import re
from datetime import timedelta
import traceback
import os
from random import choice, randint
owner = ["Insert-Owner-ID"]
@royalPanic
royalPanic / RockPaperScissors.py
Created May 11, 2019 00:54
The demo Rock Paper Scissors game code.
#rock paper scissors game
import random
#variables
win_flag = str("false")
error = str("false")
play = ""
signs = ["rock", "paper", "scissors"]
#functions
def playerName():
return(input("Enter Your Name... "))
@royalPanic
royalPanic / python_Snake.py
Created May 6, 2019 11:49
This should fix all errors related to regular crashing upon picking up food due to an index error. This uses a modulus to make the coordinates conform to the grid instead of a list.
import turtle as t
import random as r
import time
# Death delay
delay = 0.1
# Score
score = 0
high_score = 0
# Var defs
w = t.Screen()
@royalPanic
royalPanic / TurtleSnake.py
Last active May 5, 2019 04:32
The only remaining problem is that *sometimes* the game freezes when a food is collected for no explicable reason.
import turtle as t
import random as r
import time
# Death delay
delay = 0.1
# Score
score = 0
high_score = 0
# Var defs
w = t.Screen()
@royalPanic
royalPanic / TurtleGrid.md
Last active May 4, 2019 05:41
A very quick script that makes you a 600x600px grid with turtle in python.

/u/humanpabo, I got you!

#imports
import turtle as t
#var defs
w = t.Screen()
g = t.Turtle()
x = -300
y = -300
#turtle config
@royalPanic
royalPanic / ARD_RIO.md
Last active November 7, 2022 09:32
A Brief Introduction of How to Interface Arduino Controllers and the RoboRIO.

Arduino to RoboRIO I2C Communication for Pixy Camera

Edited by royal_Panic, forked from this blog post by Ethan Hansen.

If you're here you've probably looked up something like, "i2c Arduino to RoboRIO," on Google, then become frustrated with the lack of helpful responses. This is a step by step guide on how to wire together your Arduino and RoboRIO, then how to program it. This will not be an explanation of how the technology works. There are plenty of those out there. That being said, it is my opinion that if you copy someone else you should at least understand what is going on, so there will be broad, general explanations of why things are wired or programmed the way they are. I hope this saves you some tears.

Necessary Equipment

  • 1 Computer with the Arduino IDE.
  • 1 Male to Female PWM (also called 3-wire) cable.
  • 1 Arduino UNO (That's the one I'm using. I'm sure others will work, but this is the easies