mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 14:19:56 +02:00
Use globalName
This commit is contained in:
@@ -55,7 +55,7 @@ module.exports = class EjectCommand extends Command {
|
||||
const avatar = await loadImage(body);
|
||||
const random = MersenneTwister19937.seed(user.id);
|
||||
const imposter = bool()(random);
|
||||
const text = `${user.username} was${imposter ? ' ' : ' not '}An Imposter.`;
|
||||
const text = `${user.globalName || user.username} was${imposter ? ' ' : ' not '}An Imposter.`;
|
||||
const encoder = new GifEncoder(320, 180);
|
||||
const stream = encoder.createReadStream();
|
||||
const canvas = createCanvas(320, 180);
|
||||
|
||||
@@ -64,7 +64,7 @@ module.exports = class RipCommand extends Command {
|
||||
ctx.textBaseline = 'top';
|
||||
ctx.textAlign = 'center';
|
||||
ctx.font = this.client.fonts.get('CoffinStone.otf').toCanvasString(62);
|
||||
this.fillPressedText(ctx, user.username, 438, 330, 500);
|
||||
this.fillPressedText(ctx, user.globalName || user.username, 438, 330, 500);
|
||||
if (cause) this.fillPressedText(ctx, cause, 438, 920, 500);
|
||||
ctx.font = this.client.fonts.get('CoffinStone.otf').toCanvasString(37);
|
||||
this.fillPressedText(ctx, 'In Loving Memory of', 438, 292);
|
||||
|
||||
@@ -55,7 +55,7 @@ module.exports = class SteamNowPlayingCommand extends Command {
|
||||
ctx.drawImage(avatar, 26, 26, 41, 42);
|
||||
ctx.fillStyle = '#90b93c';
|
||||
ctx.font = this.client.fonts.get('Noto-Regular.ttf').toCanvasString(14);
|
||||
ctx.fillText(user.username, 80, 34);
|
||||
ctx.fillText(user.globalName || user.username, 80, 34);
|
||||
ctx.fillText(shortenText(ctx, game, 200), 80, 70);
|
||||
return msg.say({ files: [{ attachment: canvas.toBuffer('image/png'), name: 'steam-now-playing.png' }] });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user