Customize replys and add DroneCI config

This commit is contained in:
Oliver Traber 2023-02-25 20:48:04 +01:00
parent c89f288b7d
commit 5f96a210ad
Signed by: Bluemedia
GPG key ID: C0674B105057136C
10 changed files with 30 additions and 11 deletions

19
.drone.yml Normal file
View file

@ -0,0 +1,19 @@
kind: pipeline
type: docker
name: musebot
steps:
- name: docker
image: plugins/docker
settings:
pull_image: true
no_cache: true
repo: git.bluemedia.dev/bluemedia/musebot
tags:
- latest
purge: true
registry: git.bluemedia.dev
username:
from_secret: docker_username
password:
from_secret: docker_password

View file

@ -73,7 +73,7 @@ export default class {
const requiresVC = command.requiresVC instanceof Function ? command.requiresVC(interaction) : command.requiresVC; const requiresVC = command.requiresVC instanceof Function ? command.requiresVC(interaction) : command.requiresVC;
if (requiresVC && interaction.member && !isUserInVoice(interaction.guild, interaction.member.user as User)) { if (requiresVC && interaction.member && !isUserInVoice(interaction.guild, interaction.member.user as User)) {
await interaction.reply({content: errorMsg('gotta be in a voice channel'), ephemeral: true}); await interaction.reply({content: errorMsg('You must be in a voice channel'), ephemeral: true});
return; return;
} }

View file

@ -22,6 +22,6 @@ export default class implements Command {
public async execute(interaction: ChatInputCommandInteraction) { public async execute(interaction: ChatInputCommandInteraction) {
this.playerManager.get(interaction.guild!.id).clear(); this.playerManager.get(interaction.guild!.id).clear();
await interaction.reply('clearer than a field after a fresh harvest'); await interaction.reply('Queue cleared');
} }
} }

View file

@ -28,6 +28,6 @@ export default class implements Command {
player.disconnect(); player.disconnect();
await interaction.reply('u betcha, disconnected'); await interaction.reply('Disconnected from voice channel');
} }
} }

View file

@ -28,6 +28,6 @@ export default class implements Command {
} }
player.pause(); player.pause();
await interaction.reply('the stop-and-go light is now red'); await interaction.reply('Playback paused');
} }
} }

View file

@ -38,7 +38,7 @@ export default class implements Command {
await player.play(); await player.play();
await interaction.reply({ await interaction.reply({
content: 'the stop-and-go light is now green', content: 'Playback resumed',
embeds: [buildPlayingMessageEmbed(player)], embeds: [buildPlayingMessageEmbed(player)],
}); });
} }

View file

@ -32,6 +32,6 @@ export default class implements Command {
} }
player.stop(); player.stop();
await interaction.reply('u betcha, stopped'); await interaction.reply('Playback stopped');
} }
} }

View file

@ -26,7 +26,7 @@ export default class implements Command {
try { try {
await player.back(); await player.back();
await interaction.reply({ await interaction.reply({
content: 'back \'er up\'', content: 'Unskiped to previous song',
embeds: player.getCurrent() ? [buildPlayingMessageEmbed(player)] : [], embeds: player.getCurrent() ? [buildPlayingMessageEmbed(player)] : [],
}); });
} catch (_: unknown) { } catch (_: unknown) {

View file

@ -165,9 +165,9 @@ export default class AddQueryToQueue {
} }
if (newSongs.length === 1) { if (newSongs.length === 1) {
await interaction.editReply(`u betcha, **${firstSong.title}** added to the${addToFrontOfQueue ? ' front of the' : ''} queue${extraMsg}`); await interaction.editReply(`**${firstSong.title}** added to the${addToFrontOfQueue ? ' front of the' : ''} queue${extraMsg}`);
} else { } else {
await interaction.editReply(`u betcha, **${firstSong.title}** and ${newSongs.length - 1} other songs were added to the queue${extraMsg}`); await interaction.editReply(`**${firstSong.title}** and ${newSongs.length - 1} other songs were added to the queue${extraMsg}`);
} }
} }
} }

View file

@ -3,9 +3,9 @@ export default (error?: string | Error): string => {
if (error) { if (error) {
if (typeof error === 'string') { if (typeof error === 'string') {
str = `🚫 ope: ${error}`; str = `🚫 Error: ${error}`;
} else if (error instanceof Error) { } else if (error instanceof Error) {
str = `🚫 ope: ${error.message}`; str = `🚫 Error: ${error.message}`;
} }
} }