1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-16 20:00:59 -05:00

Compare commits

...

2 Commits

Author SHA1 Message Date
AnxietyisReal
bb72562557 Better picture for No Content 2023-06-27 16:38:01 +10:00
AnxietyisReal
f27c8c0f3a Use simplified embed function and update Steam faq 2023-06-27 14:19:19 +10:00
2 changed files with 12 additions and 6 deletions

View File

@ -36,7 +36,7 @@ export default async(client:TClient,Channel:string,Message:string,ServerName:str
CSG.fetchResult = `DagMP CSG failed, ${results[1]}`;
embed.addFields({name:'CSG Status',value:results[1]})
} else if (results[1].status != 200){
if (results[1].status === 204) embed.setImage('https://http.cat/204');
if (results[1].status === 204) embed.setImage('https://httpcats.com/204.jpg');
CSG.fetchResult = `DagMP CSG failed with ${results[1].status + ' ' + results[1].statusText}`;
embed.addFields({name:'CSG Status',value:results[1].status + ' ' + results[1].statusText})
} else CSG.data = (client.xjs.xml2js(results[1].data,{compact:true}) as any).careerSavegame as FSCareerSavegame

View File

@ -2,15 +2,21 @@ import Discord from 'discord.js';
import TClient from '../client.js';
export default {
run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){
function faqEmbed(color:Discord.ColorResolvable,title:string,description?:string|null,image?:string|null){
const embed = new client.embed().setColor(color).setTitle(title);
if (description) embed.setDescription(description);
if (image) embed.setImage(image);
return embed
} // I am loving this fancy idea, pretty simplified!
({
srp: ()=>interaction.reply('[Ballyspring](<https://www.farming-simulator.com/mod.php?mod_id=270745>) is the map that is used in Survival Roleplay S4.\n\n> __Note__\n> The map won\'t look closely like the one in SRP as it is privately edited version of the public map.'),
vtcR: ()=>interaction.reply(`You can get the <@&${client.config.mainServer.roles.vtcmember}> role from <#802283932430106624> by clicking :truck: button on a webhook's message\n*VTC skin can also be found in <#801975222609641472> as well.*`),
mpR: ()=>interaction.reply(`You can get the <@&${client.config.mainServer.roles.mpplayer}> role from <#802283932430106624> by clicking :tractor: button on webhook's message`),
ytscam: ()=>interaction.reply({embeds: [new client.embed().setColor(client.config.embedColor).setTitle('Scammers in YouTube comments section').setDescription('If you ever see a comment mentioning a giveaway or anything else, **it\'s a scam!**\nYou should report it to YouTube and move on or ignore it.\nP.S: They\'re on every channel and not just Daggerwin.').setImage('https://cdn.discordapp.com/attachments/1015195575693627442/1068078284996345916/image.png')]}),
steamscam: ()=>interaction.reply({embeds: [new client.embed().setColor(client.config.embedColor).setTitle('Steam account report scam').setImage('https://cdn.discordapp.com/attachments/1091300529696673792/1122266621088645130/image.png')]}),
fsShader: ()=>interaction.reply({embeds: [new client.embed().setColor(client.config.embedColor).setTitle('Clearing your shader cache folder').setDescription('If your game keeps crashing shortly after opening your game, then the shaders might be an issue.\nTo resolve this, you can go to `Documents/My Games/FarmingSimulator2022` and delete the folder called `shader_cache`').setImage('https://cdn.discordapp.com/attachments/1015195575693627442/1015195687970943016/unknown.png')]}),
fsLogfile: ()=>interaction.reply({embeds: [new client.embed().setColor(client.config.embedColor).setTitle('Uploading your log file').setDescription('You can find `log.txt` in `Documents/My Games/FarmingSimulator2022` and upload it into <#596989522395398144> along with your issue, so people can assist you further and help you resolve.').setImage('https://cdn.discordapp.com/attachments/1015195575693627442/1015195643528101958/unknown.png')]}),
fsDevConsole: ()=>interaction.reply({embeds: [new client.embed().setColor(client.config.embedColor).setTitle('Enabling the development console').setDescription('Head over to `game.xml` in `Documents/My Games/FarmingSimulator2022` and find the section that mentions `<controls>false</controls>` inside development section, change it to `true` then you are good to go!\nFYI: The keybind to open console is \``\u200b\` (backtick).').setImage('https://cdn.discordapp.com/attachments/1015195575693627442/1097273921444790322/image.png')]})
ytscam: ()=>interaction.reply({embeds: [faqEmbed(client.config.embedColor, 'Scammers in YouTube comments section', 'If you ever see a comment mentioning a giveaway or anything else, **it\'s a scam!**\nYou should report it to YouTube and move on or ignore it.\nP.S: They\'re on every channel and not just Daggerwin.', 'https://cdn.discordapp.com/attachments/1015195575693627442/1068078284996345916/image.png')]}),
steamscam: ()=>interaction.reply({embeds: [faqEmbed(client.config.embedColor, 'Steam account report scam', 'If you received a DM about this, please report it to Discord Moderators or open a [ticket](https://discord.com/channels/468835415093411861/942173932339986472/1054128182468546631)', 'https://cdn.discordapp.com/attachments/1091300529696673792/1122266621088645130/image.png')]}),
fsShader: ()=>interaction.reply({embeds: [faqEmbed(client.config.embedColor, 'Clearing your shader cache folder', 'If your game keeps crashing shortly after opening your game, then the shaders might be an issue.\nTo resolve this, you can go to `Documents/My Games/FarmingSimulator2022` and delete the folder called `shader_cache`', 'https://cdn.discordapp.com/attachments/1015195575693627442/1015195687970943016/unknown.png')]}),
fsLogfile: ()=>interaction.reply({embeds: [faqEmbed(client.config.embedColor, 'Uploading your log file', 'You can find `log.txt` in `Documents/My Games/FarmingSimulator2022` and upload it into <#596989522395398144> along with your issue, so people can assist you further and help you resolve.', 'https://cdn.discordapp.com/attachments/1015195575693627442/1015195643528101958/unknown.png')]}),
fsDevConsole: ()=>interaction.reply({embeds: [faqEmbed(client.config.embedColor, 'Enabling the development console', 'Head over to `game.xml` in `Documents/My Games/FarmingSimulator2022` and find the section that mentions `<controls>false</controls>` inside development section, change it to `true` then you are good to go!\nFYI: The keybind to open console is \``\u200b\` (backtick).', 'https://cdn.discordapp.com/attachments/1015195575693627442/1097273921444790322/image.png')]})
} as any)[interaction.options.getString('question', true)]();
},
data: new Discord.SlashCommandBuilder()