Skip to content

Commit

Permalink
New cmd's and genshin codes
Browse files Browse the repository at this point in the history
  • Loading branch information
crizmo committed Jan 18, 2022
1 parent a1c2e13 commit 415ab63
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 7 deletions.
2 changes: 2 additions & 0 deletions commands/genshin/artifacts.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ module.exports = {
let I_artifact = `https://api.genshin.dev/artifacts/${name}/flower-of-life.png`
let data = await D_artifact.json();

if(!data.name) return message.channel.send("Incorrect artifact name");

Arti_Data.push({
artiname : data.name.toLocaleString(),
rarity : data.max_rarity.toLocaleString(),
Expand Down
2 changes: 1 addition & 1 deletion commands/genshin/character.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module.exports = {
let Con_character = `https://api.genshin.dev/characters/${name}/constellation.png`
let data = await D_character.json();

if(!data.name) return message.channel.send("wrong name");
if(!data.name) return message.channel.send("Incorrect character name");

Chars_Data.push({
charname : data.name.toLocaleString(),
Expand Down
2 changes: 1 addition & 1 deletion commands/genshin/nations.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
let I_nation = `https://api.genshin.dev/nations/${name}/icon.png`
let data = await D_nation.json();

if(!data.name) return message.channel.send("wrong name");
if(!data.name) return message.channel.send("Incorrect nation name");

Nat_Data.push({
natname : data.name.toLocaleString(),
Expand Down
2 changes: 1 addition & 1 deletion commands/genshin/weapons.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
let I_weapon = `https://api.genshin.dev/weapons/${name}/icon.png`
let data = await D_weapon.json();

if(!data.name) return message.channel.send("wrong name");
if(!data.name) return message.channel.send("Incorrect weapon name");

Wp_Data.push({
wpname : data.name.toLocaleString(),
Expand Down
30 changes: 28 additions & 2 deletions direct_help/help/help_fun.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,17 @@ module.exports = {
)
.setThumbnail("https://media.discordapp.net/attachments/912047994713550928/926044429763096608/elina.jpg?width=700&height=700")

const qrEmbed = new Discord.MessageEmbed()
.setColor('#FFDBE9')
.setAuthor(`Qr Code help command `, user.displayAvatarURL())
.setTitle('Qr code command & usage')
.setURL('https://crizmo.github.io/elina/')
.addFields(
{name: 'Aliases: ', value: "`\ qr \` || `\ qr-code \`"},
{name: 'Usage: ', value: "`\ =qr hi \`"},
)
.setThumbnail("https://media.discordapp.net/attachments/912047994713550928/926044429763096608/elina.jpg?width=700&height=700")

const row = new MessageActionRow().addComponents(
new MessageButton()
.setCustomId('fun')
Expand Down Expand Up @@ -216,20 +227,24 @@ module.exports = {
const row3 = new MessageActionRow().addComponents(
new MessageButton()
.setCustomId('wyr')
.setLabel('Would-you-rather')
.setLabel('Wyr')
.setStyle('SECONDARY'),
new MessageButton()
.setCustomId('ball')
.setLabel('8-ball')
.setStyle('SECONDARY'),
new MessageButton()
.setCustomId('slots')
.setLabel('Slots-co')
.setLabel('Slots')
.setStyle('SECONDARY'),
new MessageButton()
.setCustomId('aki')
.setLabel('Akinator')
.setStyle('SECONDARY'),
new MessageButton()
.setCustomId('qr')
.setLabel('Qr-Code')
.setStyle('SECONDARY'),
);

message.channel.send({embeds: [embed], components: [row , row2 , row3]})
Expand Down Expand Up @@ -387,5 +402,16 @@ module.exports = {
await i.editReply({ embeds: [akiEmbed], components: [row, row2 , row3] });
}
});

const filter14 = i => i.customId === 'qr' && i.user.id === message.member.user.id;

const collectorQr = message.channel.createMessageComponentCollector({ filter14, time: 50000 });

collectorQr.on('collect', async i => {
if (i.customId === 'qr') {
await i.deferUpdate()
await i.editReply({ embeds: [qrEmbed], components: [row, row2 , row3] });
}
});
}
}
4 changes: 2 additions & 2 deletions direct_help/help/newhelp.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ module.exports = {
.setDescription("To get info of commands `\ =help-fun \`")
.setAuthor(`${user.username}`, avatar)
.addFields(
{name: `\u200B`, value: "`\ 8ball \` , `\ coinflip \` , `\ connectfour \` , `\ eject \` \n `\ pokemon \` , `\ rps \` , `\ slots \` , `\ snake \` , `\ trivia \` \n `\ tic-tac-toe \` , `\ aki \` , `\ wyr \`", inline: true},
{name: `\u200B`, value: "`\ 8ball \` , `\ coinflip \` , `\ connectfour \` , `\ eject \` \n `\ pokemon \` , `\ rps \` , `\ slots \` , `\ snake \` , `\ trivia \` \n `\ tic-tac-toe \` , `\ aki \` , `\ wyr \` , `\ qr \`", inline: true},
)
.setFooter(client.user.tag , client.user.displayAvatarURL())
.setTimestamp()
Expand Down Expand Up @@ -123,7 +123,7 @@ module.exports = {

const profile = new MessageEmbed()
.setTitle("Profile command!")
.setDescription("To get info of commands `\ =help-info \`")
.setDescription("To get info of commands `\ =help-profile \`")
.setAuthor(`${message.author.tag}`, avatar )
.addFields(
{name: `\u200B`, value: "`\ avatar \` , `\ deepfry \` , `\ tweet \`", inline: true},
Expand Down

0 comments on commit 415ab63

Please sign in to comment.