Skip to content

Instantly share code, notes, and snippets.

@thomasstr
thomasstr / realtime.js
Created February 6, 2021 15:05
Await for reaction Discord JS
const Command = require("../base/Command.js");
class Realtime extends Command
{
constructor (client)
{
super(client,
{
name: "realtime",
description: "Gets realtime stock values",
const Discord = require('discord.js');
const client = new Discord.Client();
client.once('ready', () => {
console.log('Ready!');
});
client.on('message', message => {
if (message.content === '!react-await') {
message.react('👍').then(() => message.react('👎'));
AUTH:
domain_login:
driver = plaintext
public_name = LOGIN
client_send = : postmaster:password
ROUTERSTART:
domain:
driver = manualroute
domains = ! +local_domains
@thomasstr
thomasstr / disable-comments.php
Created November 15, 2023 08:11
disable-comments.php
<?php
add_action('admin_init', function () {
// Redirect any user trying to access comments page
global $pagenow;
if ($pagenow === 'edit-comments.php' || $pagenow === 'options-discussion.php') {
wp_redirect(admin_url());
exit;
}