mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-12-28 08:55:38 -05:00
Update articles
This commit is contained in:
parent
f111268164
commit
703f587cc9
@ -1,5 +1,10 @@
|
||||
articles:
|
||||
- embed:
|
||||
id: 0
|
||||
title: ""
|
||||
description: ""
|
||||
id: 338
|
||||
title: "[Animals] Chickens"
|
||||
description: |
|
||||
Chickens are a type of livestock in Farming Simulator 22, they are commonly raised for their eggs. To keep chickens healthy and productive, it is important to provide them with proper care and nutrition.
|
||||
|
||||
Chickens primarily eat grains such as wheat, barley and sorghum.
|
||||
|
||||
Taking care of chickens can be a rewarding experience in Farming Simulator 22, as they can provide a steady supply of eggs for your farm profits. Properly managing their nutrition and environment will help ensure their well-being and productivity.
|
||||
|
@ -30,9 +30,26 @@ export default class Academy {
|
||||
.setTitle(queryFound.embed.title)
|
||||
.setURL(`https://www.farming-simulator.com/newsArticle.php?news_id=${queryFound.embed.id}`)
|
||||
.setDescription(queryFound.embed.description)
|
||||
.setFooter({text: 'Farming Simulator Academy'})
|
||||
.setFooter({text: 'This information is provided by the contributors with their best FS knowledge. If you find any mistakes, please contact Toast.'})
|
||||
]});
|
||||
},
|
||||
how_to_contribute: ()=>interaction.reply({embeds: [new client.embed()
|
||||
.setColor(client.config.embedColor)
|
||||
.setTitle('How to contribute to the Academy')
|
||||
.setDescription(MessageTool.concatMessage(
|
||||
'If you want to show your support and contribute your knowledge to the academy command, you can do so by following the steps below:',
|
||||
'1. Create a [GitHub account](https://github.com/signup) if you haven\'t already',
|
||||
'2. Fork the [GitHub repository](https://github.com/AnxietyisReal/Daggerbot-TS/tree/master)',
|
||||
'3. Navigate to the `articles.yaml` file inside the `src` directory.',
|
||||
'4. Click the pencil icon to edit the file and add your article (**has to be closely related to official FSA article**) using the following format:',
|
||||
'```yaml',
|
||||
'- embed:',
|
||||
' id: <article_id> # Article ID (/newsArticle.php?news_id=<article_id>)',
|
||||
' title: <article_title> # Embed title and search term, don\'t make it too long',
|
||||
' description: <article_description> # Embed description, limit is 4096 and multi-line is supported',
|
||||
'```',
|
||||
)).setFooter({text: 'Or if you\'re not familiar with GitHub, you can contact Toast directly with your article'})
|
||||
]}),
|
||||
update: async()=>{
|
||||
if (!client.config.whitelist.includes(interaction.user.id)) return MessageTool.youNeedRole(interaction, 'bottech');
|
||||
const articles = await Undici.fetch('https://raw.githubusercontent.com/AnxietyisReal/Daggerbot-TS/master/src/articles.yml').then(x=>x.text());
|
||||
@ -56,6 +73,9 @@ export default class Academy {
|
||||
.setDescription('The search term')
|
||||
.setRequired(true)
|
||||
.setAutocomplete(true)))
|
||||
.addSubcommand(x=>x
|
||||
.setName('how_to_contribute')
|
||||
.setDescription('Provides information on how to contribute to the academy command'))
|
||||
.addSubcommand(x=>x
|
||||
.setName('update')
|
||||
.setDescription('Updates the local file with new information from GitHub repository'))
|
||||
|
Loading…
Reference in New Issue
Block a user