mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-16 00:12:32 +02:00
Add examples
This commit is contained in:
@@ -44,24 +44,17 @@ module.exports = class EjectCommand extends Command {
|
||||
key: 'user',
|
||||
type: 'user',
|
||||
default: msg => msg.author
|
||||
},
|
||||
{
|
||||
key: 'imposter',
|
||||
type: 'boolean',
|
||||
default: ''
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg, { user, imposter }) {
|
||||
async run(msg, { user }) {
|
||||
const avatarURL = user.displayAvatarURL({ extension: 'png', size: 128 });
|
||||
const { body } = await request.get(avatarURL);
|
||||
const avatar = await loadImage(body);
|
||||
if (imposter === '') {
|
||||
const random = MersenneTwister19937.seed(user.id);
|
||||
imposter = bool()(random);
|
||||
}
|
||||
const random = MersenneTwister19937.seed(user.id);
|
||||
const imposter = bool()(random);
|
||||
const text = `${user.username} was${imposter ? ' ' : ' not '}An Imposter.`;
|
||||
const encoder = new GIFEncoder(320, 180);
|
||||
const canvas = createCanvas(320, 180);
|
||||
|
||||
Reference in New Issue
Block a user