Skip to content

Instantly share code, notes, and snippets.

View Restioson's full-sized avatar
👋

Restioson Restioson

👋
View GitHub Profile
@Restioson
Restioson / fixxit.js
Last active December 28, 2016 14:04
A Discord bot for software development, support and discussion groups which logs issues
//Constants
const Discord = require("discord.js");
const client = new Discord.Client();
//Variables
var issues = new Array();
//Start event
client.on("ready", () => {
#Imports
import Tkinter
import socket
import threading
#Tkinter
root = Tkinter.Tk()
root.title("Socket console")
#Sockets
// Half-Life Discord Cleverbot bot
var Discord = require("discord.js");
var bot = new Discord.Client();
var cleverbot = require("cleverbot.io")
// Cleverbot
var cleverbot = new cleverbot("API_USER", "API_KEY")
// Startup message
bot.on("ready", () => {
# Imports
from bs4 import BeautifulSoup
import string
from urllib.request import urlopen
import time
import nltk
import json
def crawl():
''' Crawls lyrics on www.azlyrics.com '''
# -- Commands -- #
async def command_meme(self, keywords: list, channel: discord.Channel):
"""Sends closest matching meme to channel"""
matching = []
Meme = collections.namedtuple("Meme", ["matches", "filename", "path"])
# Populate list of matching memes with `Meme` named tuples
for meme_path in self.memes:
All my gists have the Apache 2.0 license on them. Use them at will!
import string
import unidecode
NUMBERS = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"]
def emojify(text):
"""Converts text to regional indicators for use in discord"""
emojified = ""
//Constants
const Discord = require("discord.js");
const Fs = require("fs")
const client = new Discord.Client();
//Variables
var issues = new Array();
var users = new Array();
//Classes
# Recursively converts flac to mp3
# Imports
import os
import itertools
import ffmpy
import glob
# Directory for mp3 files
mp3_dir = os.path.join(os.getcwd(), "mp3")
# Import discord.py
import discord
import asyncio
client = discord.Client()
@client.event
async def on_ready():