im not typing my username every fucking time fuck you
This commit is contained in:
parent
3995a82396
commit
0a95b72051
1 changed files with 2 additions and 8 deletions
10
src/index.ts
10
src/index.ts
|
|
@ -33,12 +33,7 @@ function keepV(url) {
|
||||||
|
|
||||||
const commands = [
|
const commands = [
|
||||||
new SlashCommandBuilder().setName("nowplaying")
|
new SlashCommandBuilder().setName("nowplaying")
|
||||||
.setDescription("balls").addStringOption(option =>
|
.setDescription("balls")
|
||||||
option
|
|
||||||
.setName("user")
|
|
||||||
.setDescription("username")
|
|
||||||
.setRequired(true)
|
|
||||||
)
|
|
||||||
.setIntegrationTypes([
|
.setIntegrationTypes([
|
||||||
ApplicationIntegrationType.UserInstall
|
ApplicationIntegrationType.UserInstall
|
||||||
])
|
])
|
||||||
|
|
@ -67,9 +62,8 @@ client.on(Events.InteractionCreate, async (interaction) => {
|
||||||
if (commandName !== "nowplaying") return;
|
if (commandName !== "nowplaying") return;
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|
||||||
const user = interaction.options.getString('user');
|
|
||||||
|
|
||||||
const meow = await fetch(`https://api.listenbrainz.org/1/user/${user}/playing-now`).then((res) => res.json());
|
const meow = await fetch(`https://api.listenbrainz.org/1/user/${config.listenbrainzAccount}/playing-now`).then((res) => res.json());
|
||||||
if (!meow) {
|
if (!meow) {
|
||||||
interaction.followUp("something shat itself!");
|
interaction.followUp("something shat itself!");
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue