Skip to content

Instantly share code, notes, and snippets.

@yada-yoda
yada-yoda / delete-all-messages.js
Created January 27, 2020 06:56 — forked from IMcPwn/delete-all-messages.js
Delete all messages in a Discord channel
// Turn on Developer Mode under User Settings > Appearance > Developer Mode (at the bottom)
// Then open the channel you wish to delete all of the messages (could be a DM) and click the three dots on the far right.
// Click "Copy ID" and paste that instead of LAST_MESSAGE_ID.
// Copy / paste the below script into the JavaScript console.
// If you're in a DM you will receive a 403 error for every message the other user sent (you don't have permission to delete their messages).
var before = 'LAST_MESSAGE_ID';
clearMessages = function(){
const authToken = document.body.appendChild(document.createElement`iframe`).contentWindow.localStorage.token.replace(/"/g, "");
const channel = window.location.href.split('/').pop();
@yada-yoda
yada-yoda / discordwebhook.html
Created November 29, 2019 21:55 — forked from ThePhxRises/discordwebhook.html
Sends messages using Discord webhooks. Now supports multiline messages and has a proper submit button.
<html><head>
<link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.7/css/materialize.min.css" rel="stylesheet">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>General Use Sender</title>
<style>
textarea{
resize: none;
}
.btn-full-width {
@yada-yoda
yada-yoda / index.js
Created March 11, 2019 04:41
Simple, complete example of a bot in Discord.js
// Load up the discord.js library
const Discord = require("discord.js");
// This is your client. Some people call it `bot`, some people call it `self`,
// some might call it `cootchie`. Either way, when you see `client.something`, or `bot.something`,
// this is what we're refering to. Your client.
const client = new Discord.Client();
// Here we load the config.json file that contains our token and our prefix values.
const config = require("./config.json");
@yada-yoda
yada-yoda / poshmark-share
Created January 14, 2019 07:33 — forked from SeanMcGrath/poshmark-share
JS code to share all items in a poshmark closet to followers and all available events
var clickDelta = 2000; // ms delay between clicks
var cycleDelta = clickDelta * 100; // ms delay between share cycles
// do the actual clicking
var clickLinks = function() {
$(this).click();
$("[data-pa-name^='share_poshmark']").click();
};
var notSold = function(el) {
@yada-yoda
yada-yoda / markdown-text-101.md
Created October 17, 2018 16:22 — forked from matthewzring/markdown-text-101.md
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

Sweet Styles

Italics *italics* or _italics_

Underline italics __*underline italics*__

@yada-yoda
yada-yoda / config.py
Created November 30, 2017 02:44 — forked from randyklein/config.py
Simple NiceHash Monitor
#config
minProf= .001 #min profit for alert in BTC/Day
slowAlertTimer = 300 #min time for slow alert in seconds
offTimer = 0 #min time of off alert in seconds
btcAddress = "address goes here" #niceHash BTC address to monitor
iftttKey = "key goes here" #key from IFTTT Maker applet