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
<?php | |
/** | |
* Display posts with taxonomy filter | |
* | |
* Add file to same folder as functions.php | |
* Add to functions.php: get_template_part( 'class-posts-tax-filter', '' ); | |
* USAGE: [posts_tax_filter post_type="post" qty="6"] | |
*/ |
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
/** | |
* Display any user's avatar | |
*/ | |
commands.raw('avatar', async (message) => { | |
// Get the user id | |
const _mentions = message.mentions; | |
const _msg = message.content.replace('!avatar', '').replaceAll(' ', ''); | |
var _userID = ''; | |
if (_mentions[0]) { | |
_userID = _mentions[0].id; |
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
/** | |
* Ban a user by mention or id | |
*/ | |
commands.raw('ban', async (message) => { | |
// Get the current user | |
var _currentUser = message.member; | |
// Check if the current user has the admin role if trying to change someone else's nickname | |
if (!_currentUser.roles.includes(ADMIN_ROLE_ID)) { | |
return message.reply( |
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 { commands } from './command_group'; | |
/** | |
* Fetch with a command | |
*/ | |
commands.on( | |
{ | |
name: 'js', | |
description: 'Fetch a JS code reference', | |
}, |
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 { commands } from './command_group'; | |
/** | |
* Fetch with a command | |
*/ | |
commands.on( | |
{ | |
name: 'css', | |
description: 'Fetch a CSS code reference', | |
}, |
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 { commands } from './command_group'; | |
import { | |
ADMIN_ROLE_ID, | |
BIG_HELPER_ROLE_ID, | |
APPROVED_FOR_HIRE_ID, | |
FREELANCER_FOR_HIRE_ID, | |
EXPERTS_FOR_HIRE_CHANNEL_ID, | |
} from './ids'; | |
/** |
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 { commands } from './command_group'; | |
import { STACKEXCHANGE_API_CHANNEL_ID } from './ids'; | |
/** | |
* KV Namespace | |
*/ | |
const stackKv = new pylon.KVNamespace('stackexchange'); | |
/** | |
* Command for listing all items in the KV Namespace |
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 { commands } from './command_group'; | |
import { WELCOME_CHANNEL_ID } from './ids'; | |
/** | |
* Get user's publicFlags | |
*/ | |
function getFlagsOld(publicFlags) { | |
const flags = Array( | |
[1, 1 << 0, 'DISCORD_EMPLOYEE', 'Discord Employee', true], | |
[2, 1 << 1, 'DISCORD_PARTNER', 'Discord Partner', true], |
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 { commands } from './command_group'; | |
import { SUGGESTED_PLUGINS_CHANNEL_ID } from './ids'; | |
import { numberWithCommas } from './utility'; | |
/** | |
* KV Namespace | |
*/ | |
const pluginKV = new pylon.KVNamespace('plugins'); | |
/** |