This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { GatewayVoiceServerUpdateDispatchData, GatewayVoiceState } from "discord-api-types"; | |
const connection = Voice.joinVoiceChannel({ | |
channelId: channel.id, | |
guildId: channel.guild_id, | |
adapterCreator: (methods) => { | |
const voiceServerUpdate = (data: GatewayVoiceServerUpdateDispatchData) => { | |
methods.onVoiceServerUpdate(data) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let browser = typeof window !== 'undefined' | |
const WS = browser ? WebSocket : require("ws"); | |
const req = browser ? fetch : require("node-fetch"); | |
function wait(a) { return new Promise(r => { setTimeout(() => r(), a) }) } | |
class Client { | |
constructor(token, options = {}, debug = () => { }) { | |
this.debug = debug; | |
this.options = { | |
shards: options.shards || 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { ChannelTypes: CT } = require("../util/Constants.js") | |
/** | |
* Represents a channel's type | |
*/ | |
class ChannelTypes { | |
/** | |
* @param {Number} number The Discord assigned indentifier for a channel | |
*/ | |
constructor(number) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ShaysEnergyBoi { | |
constructor(config, baseURI = "api.shaybox.com", extend = "tplink") { | |
this.config = config || { | |
"type": "bar", | |
"options": { | |
"maintainAspectRatio": false, | |
"scales": { | |
"yAxes": [{ | |
"ticks": { | |
"beginAtZero": true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = class JPBFilter { | |
constructor(client, filterFile, linkBypFile) { | |
this.filterFile = filterFile; | |
this.filter = require(filterFile); | |
this.linkBypFile = linkBypFile; | |
this.linkByp = require(linkBypFile).links; | |
this.client = client; | |
this.replaceSpots = { | |
spaces: /(\_|\/|\\|\.|\n|\&|\-|\+|\=|\:|\~)/gi, | |
nothing: /(\"|\*|\'|\||\`|\<|\>|\@|\#|\!|\,|\(|\)|\[|\]|\{|\}|\;|\%)/gi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(bot, connection, stuff, auth) { | |
var SelfReloadJSON = require('self-reload-json'); | |
const modulename = "swearfilter" | |
const swears = new SelfReloadJSON("./swears.json") | |
var statuslog = bot.channels.get("450444337357258772") | |
var logchannel = bot.channels.get("399688995283533824") | |
var serverlistchannel = bot.channels.get("413831069117186078") | |
var botowner = bot.users.get("142408079177285632") |