elite-dangerous-news-discord-bot

所属分类:collect
开发工具:JavaScript
文件大小:0KB
下载次数:0
上传日期:2023-08-04 20:39:13
上 传 者sh-1993
说明:  从普通Elite Dangerous news获取以Elite Danger为中心的不和谐服务器的新闻帖子。
(Gets news posts from the normal Elite Dangerous News, for Elite Dangerous centered discord servers.)

文件列表:
LICENSE (35149, 2023-08-07)
async-as-sync.js (465, 2023-08-07)
bot.js (50131, 2023-08-07)
elite-dangerous-news-data-formats.md (11297, 2023-08-07)
images/ (0, 2023-08-07)
images/Elite-Dangerous-Logo/ (0, 2023-08-07)
images/Elite-Dangerous-Logo/Elite-Dangerous-Detailed.svg (9269, 2023-08-07)
images/Elite-Dangerous-Logo/Elite-Dangerous.svg (3319, 2023-08-07)
images/Elite-Dangerous-Logo/Elite-Dangerous_Silver_Thumbnail.png (6516, 2023-08-07)
images/Elite-Dangerous-Logo/Elite-Dangerous_White_Bot_Picture.png (7062, 2023-08-07)
images/Elite-Dangerous-Logo/Elite-Dangerous_White_w2160_canvas_x2160.png (86741, 2023-08-07)
images/No-Image.png (376627, 2023-08-07)
images/example.png (1221471, 2023-08-07)
images/information.png (248406, 2023-08-07)
package-lock.json (22318, 2023-08-07)
package.json (605, 2023-08-07)

# Elite Dangerous News Discord Bot This bot primarily uses the official API provided by Frontier Developments, at: https://cms.elitedangerous.com/api/news ### As mentioned on [EliteWeek](https://www.youtube.com/watch?v=XFipg8c6hR0&t=2774s)! ### [Invite this bot](https://discord.com/api/oauth2/authorize?client_id=802086433526513685&permissions=523328&scope=bot) to your Discord server! Links: - Frontier Forums: https://forums.frontier.co.uk/threads/569057/ - EDCodex Entry: http://edcodex.info/?m=tools&entry=504 For any status updates, I may post something at one of the previous links, or at my Twitter: [![Twitter](https://i.ibb.co/GRCdkR1/twitter.png)](https://twitter.com/Alien_Drew) ## Appearance ![Example](https://github.com/Andrew-J-Larson/elite-dangerous-news-discord-bot/blob/main/images/example.png?raw=true) | ![Information](https://github.com/Andrew-J-Larson/elite-dangerous-news-discord-bot/blob/main/images/information.png?raw=true) -- | -- ## Want to modify and run your own instance? Since this bot was made with [Node.js](https://nodejs.org), you'll need to make sure to install the latest LTS version as that's what I've been using with this project. ### Initial Setup 1. If you don't already have git installed, please do so, and then run `git clone https://github.com/Andrew-J-Larson/elite-dangerous-news-discord-bot`. 2. Then, before trying to run the bot, you'll need to go into the folder and update the packages by running `npm update`. 3. Make sure you already have filled out a [new developer application with discord](https://discord.com/developers/applications) so you can retrieve the bot token, to put into config in the next step. 4. You'll need to go to the directory above the git clone (e.g. `../elite-dangerous-news-discord-bot`), and create a file named `elite-dangerous-news-discord-bot.config` containing the following, while replacing `[YOUR BOT TOKEN HERE]` with your application's bot token: ```json { "BOT_TOKEN": "[YOUR BOT TOKEN HERE]" } ``` 5. Afterwards, you can go back into the git clone and start the bot with `npm start`. \* Not required, but I recommend using [pm2](https://www.npmjs.com/package/pm2) (or another production process manager) for node, as it'll make headless setup a lot easier. 6. Lastly, you'll need to go back to the developer applications website so you can create the bot invite link. I suggest using the permissions code `523328`, but at this time it only needs permissions for viewing channels, sending messages, embedding links, attaching files, using external emojis, and mentioning `@everyone`/`@here`/all roles. You'll want to make sure to also have the scope set to `bot`. 7. Then you can use the link, which should look something like `https://discord.com/api/oauth2/authorize?client_id=[your-client-id]&permissions=523328&scope=bot`, to add it to one server. ### Node.js Libraries Used - **[discord.js](https://github.com/discordjs/discord.js)** - A powerful JavaScript library for interacting with the [Discord API](https://discord.com/developers/docs/intro). - **[node-fetch](https://github.com/node-fetch/node-fetch)** - A light-weight module that brings the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) to Node.js. - **[html-to-text](https://github.com/html-to-text/node-html-to-text)** - An advanced html to text converter. - **[moment](https://github.com/moment/moment)** - Parse, validate, manipulate, and display dates in javascript. - **[moment-precise-range-plugin](https://github.com/codebox/moment-precise-range)** - A moment.js plugin to display human-readable date/time ranges. - **[sync-rpc](https://github.com/ForbesLindesay/sync-rpc)** - Run asynchronous commands synchronously by putting them in a separate process. ## Buy me a cup of coffee? [![patreon](https://i.ibb.co/WnqRJ92/patreon.png)](https://www.patreon.com/bePatron?u=8414636) [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/E1E845O3L)

近期下载者

相关文件


收藏者