Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theabbie/devrant-bot
An NPM package to create DevRant Bots
https://github.com/theabbie/devrant-bot
devrant devrant-bots theabbie
Last synced: 24 days ago
JSON representation
An NPM package to create DevRant Bots
- Host: GitHub
- URL: https://github.com/theabbie/devrant-bot
- Owner: theabbie
- License: mit
- Created: 2020-10-16T15:05:25.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-23T07:32:59.000Z (over 3 years ago)
- Last Synced: 2024-10-11T23:11:10.752Z (27 days ago)
- Topics: devrant, devrant-bots, theabbie
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/devrant-bot
- Size: 36.1 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-devrant - devrant-bot - A wrapper for DevRant API specifically to create bots (Uncategorized / Uncategorized)
README
# DevRant Bot
An NPM package to create DevRant bots,
Super easy to implement,
Never care about implementation again, just focus on functionality.
![image](https://user-images.githubusercontent.com/17960677/96278822-9703a480-0ff3-11eb-804e-859ef31be175.png)
## How To Use
This package can be used to create bots which will act when someone mentions it.
It can then Reply to that mention with some text or image.
```js
var Bot = require('devrant-bot');(async function() {
var bot = new Bot();
await bot.login("username","password");
var mentions = await bot.get();
console.log(mentions);
})();
```
Which produces,```js
[
{
"rid": 2821893, //rant ID
"cid": 3308364, //comment ID
"is_bot": false, //User who has called is a bot or not
"text": "some message", //Message
"user": "theabbie", //Username of user who called
"time": 1603281044 //Timestamp of comment
"rto": [{
"id": 3307103,
"text": "text",
"time": 1603264598,
},
...]
},
...
]
```To reply,
```js
(async function() {
var bot = new Bot();
await bot.login("username","password");
var mentions = await bot.get();
for (msg of mentions) {
await bot.reply(msg.user,msg.rid,"reply", image_url);
}
})();
```This makes bot development really easy and you can safely focus only on the functionality rather than the implementation of the DevRant bot.
## Contributing
Thank you for your interest in contributing, If you feel like there's something missing or any new feature can be added, just create a PR and I will see the rest.
## Help
You can contact me on social media, Everything about me can be found [here](https://theabbie.github.io)
## Installation
### Requirements
* Node.Js installed
### Dev Dependencies
* Axios
* RantScript## Credits
* [RantScript](https://github.com/leahlundqvist/RantScript/) For Creating an excellent Wrapper For the DevRant API.
## Contact
Contact me anywhere, just visit [my portfolio](https://theabbie.github.io)
## License
This project is licensed under MIT License, See [LICENSE](/LICENSE) for more information