Skip to content

Instantly share code, notes, and snippets.

View apos37's full-sized avatar
⌨️
Cooking somethin’ big….

Aristocles apos37

⌨️
Cooking somethin’ big….
View GitHub Profile
@apos37
apos37 / stackexchange_api.ts
Created August 12, 2022 21:26
Pylon Bot WordPress Stack Exchange Feed
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
@apos37
apos37 / public_flags.ts
Created August 12, 2022 21:24
Pylon Bot Commands for User Public Flags
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],
@apos37
apos37 / plugins.ts
Created August 12, 2022 21:15
Pylon Bot Command for Sharing WP.org Plugin from Repository
import { commands } from './command_group';
import { SUGGESTED_PLUGINS_CHANNEL_ID } from './ids';
import { numberWithCommas } from './utility';
/**
* KV Namespace
*/
const pluginKV = new pylon.KVNamespace('plugins');
/**