Skip to content

Instantly share code, notes, and snippets.

View Jackzmc's full-sized avatar

Jackz Jackzmc

View GitHub Profile
if (msg.content.charAt(0) == prefix && msg.content.charAt(1) !== "_") {
for(var i=0;i<commands.main.length;i++) {
if(commands.main[i].cmd === arg[0]){
return commands.main[i].execute(msg,arg);
}
}
for(var i=0;i<custom_commands;i++) {
if(custom_commands[i].cmd === arg[0]){
return custom_commands[i].execute(msg,arg);
}
{
"content": "this `supports` __a__ **subset** *of* ~~markdown~~ 😃 ```js\nfunction foo(bar) {\n console.log(bar);\n}\n\nfoo(1);```",
"embed": {
"title": "'help' Command Information",
"description":"does helpful stuff\n\nSnippet of Code```javascript\nfunction test(java){\n is_gay = true;\n}```",
"fields":[
{
"name":"Aliases",
"value":"stop, end, shutdown, killtask"
},
@Jackzmc
Jackzmc / user-info.js
Created August 5, 2017 04:38
the hacks
{
cmd:"user-info",
aliases:['userinfo'],
description:"Gets information from a user ID/name",
parameters:[],
execute: (client,msg,arg) => {
var userList = client.users.array();
var lookup = (user) => {
var member_info,
user_info;
{
cmd:"stats",
aliases:["uptime",'botinfo','info'],
description:"Stats for JackzCo Bot",
parameters:[],
execute: (client,msg,arg) => {
var botName = msg.guild.members.get(client.user.id).nickname;
var uptime = "Moment is not installed";
var since = "";
if(moment) {
if(message.mentions.users.has(client.user.id) || message.mentions.everyone || (message.guild && message.mentions.roles.filter(r=>message.guild.member(client.user.id).roles.has(r.id)).size > 0)) {
const chan = !!message.guild ? `${message.guild.name} #${message.channel.name}` : "";
client.log("mention", chan, message.author, message.cleanContent);
}
if(message.author.id !== client.user.id) return;
if(message.content.indexOf(client.config.prefix) !== 0) return;
const args = message.content.split(/ +/g);
const command = args.shift().slice(client.config.prefix.length).toLowerCase();
@Jackzmc
Jackzmc / docs.js
Last active August 29, 2017 01:39
discord.js documentation command for selfbot
//code for discord.js docs. Used for selfbot (using evie.selfbot's code). It will automatically cache (and update) the docs.
//Can easily convert it to other code ;)
const request = require('snekfetch');
const moment = require('moment');
var docsCache = {
master:{lastUpdated: moment('1970-01-01T00:00:00Z'),data:{}}, //set to unix epoch, for diff to work
stable:{lastUpdated: moment('1970-01-01T00:00:00Z'),data:{}},
}
@Jackzmc
Jackzmc / docs.js
Last active August 30, 2017 22:44
docs.js for caedos
module.exports = function(client, msg, arg, isPerm, isDM, upperM, splitM){
//docs.js for caedos
//TODO rewrite get docs
if (arg === "DOCS") {
var usersPref = "stable";
switch(splitM[2].toLowerCase()) {
case "master":
usersPref = "master"
break;
@Jackzmc
Jackzmc / example.js
Created August 29, 2017 01:42
caedos example
module.exports = function(client, msg, arg, isPerm, isDM, upperM, splitM){
if (arg === "WHERE"){
//isDM would execute the code only if the user sent the command through a Direct Message.
if (isDM == true){
msg.reply("You are executing this from a Direct Message!")
}
if (isPerm == true){
msg.reply("You are permissioned!")
}
if (isPerm == false && isDM == false){
const JsonDB = require('node-json-db');
const db = new JsonDB('database.json',true,true); //to be moved to mysql/sqlite (have fun future self)
const settings = [
{
name:"prefix",
config_value:"prefix",
help:"Can be any characters except (to be filled in), maximum of 5 characters.\nYou may disable prefix, you will have to @mention bot",
boolean:false,
exec: (msg,args,config) => {
@Jackzmc
Jackzmc / Quiet.theme.css
Created September 10, 2017 17:17
Improved version of Quiet theme by Omniscient, getting rid of his hatred/love of some people
//META{"name":"Quiet (Improved)","description":"Dark and Quiet. Easy on the eyes.","author":"Omniscient (edited by Jackz)","version":"1.0"}*//
//Improved by getting rid of shitty dev crap
//MAKE SURE BD BLUE IS OFF
/* IMPORT CSS FROM GITHUB */
@import url(https://fonts.googleapis.com/css?family=Satisfy);
:root {
--version-content: "5.6"
}
/* Version Displayed */