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 serial | |
import pydirectinput | |
arduino = serial.Serial('COM13', 115200, timeout=.1) # Serial input from arduino. change COM port to wherever your arduino is connected | |
pydirectinput.PAUSE = 0 | |
keysDown = {} # List of currently pressed keys | |
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 int thumbstick_pin = 8; | |
const int X_pin = A0; // Plug thumbstick X direction into pin A0 | |
const int Y_pin = A1; // Plug thumbstick Y direction into pin A1 | |
int xc; | |
int yc; | |
int TSButton; | |
void setup() { | |
for (int i = 0; i < 2; i++) { | |
pinMode(thumbstick_pin, INPUT); |
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 = { | |
name: 'clear', | |
description: "A clear command!", | |
execute(message, args){ | |
const amount = parseInt(args[0]) + 1; | |
if(isNaN(amount)){ | |
return message.reply('That is not a valid number'); | |
} else if(amount <= 1 || amount > 100){ | |
return message.reply('Please input a number between 1 and 99'); |
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 = { | |
name: 'test', | |
description: "A command for testing!", | |
execute(message, args){ | |
const emoji = guild.emojis.cache.first(); | |
msg.reply(`Hello! ${emoji}`); | |
} | |
} |
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
Collection(11) [Map] { | |
'640297380209491968' => Role { | |
guild: Guild { | |
members: [Collection [Map]], | |
channels: [Collection [Map]], | |
roles: [Collection [Map]], | |
presences: [Collection [Map]], | |
deleted: false, | |
available: true, | |
id: '640297380209491968', |
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 = { | |
name: 'owner', | |
description: 'Gives the user owner', | |
execute(message, args){ | |
message.member.roles.add('640298337635139624'); | |
} | |
} |
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 { execute } = require("./site"); | |
module.exports = { | |
name: 'ping', | |
description: 'Replys with pong', | |
execute(message, args){ | |
if(message.member.roles.cache.has('640298337635139624')){ | |
message.channel.send('pong'); | |
} else { | |
message.channel.send("You don't have the permissions to run this command") |
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 Discord = require('discord.js'); | |
const bot = new Discord.Client(); | |
const fs = require('fs'); | |
const prefix = '-'; | |
const token = 'TOKEN'; | |
bot.commands = new Discord.Collection(); |