Lol
function getRandomInt(min, max) { | |
min = Math.ceil(min); | |
max = Math.floor(max); | |
return Math.floor(Math.random() * (max - min)) + min; | |
} | |
if (msg.content.toLowerCase().startsWith("*say")) { //The say command | |
var a = msg.content.substring(5); |
{ | |
"userFriendlyLocaleName":"English", | |
"possible8ball":["Yes", "No", "I don't know", "My sources tell it's true", "I am sorry, but I would rather not answer", "Most probably yes", "Most probably no", "Try again later"], | |
"welcoming":{ | |
"welcomeMessageDef":"We've got a new member here! Welcome ##mention_user## to **##guild_name##**!", | |
"leaveMessageDef":"Unfortunately, **##user_name##** has left **##guild_name##** :sob:" | |
}, | |
"servinfo":{ | |
"EmbedTitle":"Server Information", | |
"GuildNameCatTitle":"Guild Name", |
I hereby claim:
- I am freeapp2014 on github.
- I am freeapp2014 (https://keybase.io/freeapp2014) on keybase.
- I have a public key ASClLytFWVTohE6izt1beLp6zHdwb-jV_Kgy-lIuAR9g7wo
To claim this, I am signing this object:
newSR=48000 # The new sample rate | |
currentSR=$(./brstm_converter "$1" | grep "Sample rate" | grep -o -E [0-9]+); | |
currentLoop=$(./brstm_converter "$1" | grep "Loop start" | grep -o -E [0-9]+); | |
newLoopPoint=$(echo "scale=3;$currentLoop*($newSR/$currentSR)" | bc); | |
./brstm_converter "$1" -l $newLoopPoint --ffmpeg "-ar $newSR" -o "$1.new.brstm" |
This project is an attempt to replace the traditional "command-reply" architecture of a Discord bot and provide user a more verbose and real-time experience as well as sending less messages to chat.
A user uses a command to summon an interactive menu which is a RichEmbed with reactions under it. Clicking reactions edits the message to reflect the current state. User input is handled by prompting for data in the main embed and letting the user send the message using a separate message which is automatically deleted after processed. The session is linked to a specific user so other messages do not affect the operation although its still a better idea to use a separate channel that does not get chat activity in it. After the operation the session may be closed with the main message getting deleted and all the temporary data for that session (views history or other stuff) cleared.
#!/usr/local/bin/node | |
let input = require("child_process").execSync('echo info | nc 127.0.0.1 4212').toString("utf-8"); | |
let regex = /^\| album: (.*)/mg; | |
let album = regex.exec(input); | |
album = (album == null ? "Unknown Album" : album[1]); | |
regex = /^\| title: (.*)/mg; | |
let title = regex.exec(input); | |
title = ( title == null ? "Unknown Title" : title[1]); | |
if (title == "Unknown Title" || title == ""){ | |
regex = /^\| filename: (.*)/mg; |
PLATFORMPATH="/Applications/Xcode.app/Contents/Developer/Platforms" | |
TOOLSPATH="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin" | |
export IPHONEOS_DEPLOYMENT_TARGET="11.0" | |
arch="arm64" | |
platform="iPhoneOS" | |
SDKVERSION="12.0" | |
clang++ -std=c++0x -O2 -arch $arch -isysroot $PLATFORMPATH/$platform.platform/Developer/SDKs/$platform$SDKVERSION.sdk -miphoneos-version-min=$IPHONEOS_DEPLOYMENT_TARGET -c brstm-main.cpp -o brstm-main.o | |
ar r openrevolution.a brstm-main.o |
function getRandomInt(min, max) { | |
min = Math.ceil(min); | |
max = Math.floor(max); | |
return Math.floor(Math.random() * (max - min)) + min; | |
} | |
if (msg.content.toLowerCase().startsWith("*8ball")) { //The 8ball Message | |
var msg1 = Array(5); | |
msg1[1] = "Yes"; | |
msg1[2] = "No"; | |
msg1[3] = "Maybe :wink:"; |