Author Topic: Discord Lorebot  (Read 841 times)

0 Members and 1 Guest are viewing this topic.

Oligo

  • Immortal
  • Fodder
  • *
  • Posts: 78
  • Favorite Zone: Dunmir
Discord Lorebot
« on: June 18, 2017, 12:36:25 AM »
For folks familiar with my prior IRC and Skype versions of Lorebot, I ported much of the lore retrieval functionality to Discord.
Currently lorebot database has 4,803 lores in database.

You can message LoreBot on Discord with the following tag, it is case sensitive.

Code: [Select]
@LoreBot#2504

Lorebot is on the following Discord server: https://discord.gg/vNuGEpA


To run LoreBot yourself, you will need Node, MySQL, and a Discord bot token from Discord.
https://github.com/longhorn09/lorebot


Code: [Select]
# Node installation
sudo apt-get update -y
sudo apt-get install nodejs
sudo apt-get install npm

# MySQL installation
sudo apt-get install mysql-server

# Lorebot for Discord installation
git clone https://github.com/longhorn09/lorebot.git
cd lorebot
npm install
npm start
« Last Edit: July 19, 2017, 10:46:12 PM by Oligo »

el conquistador

  • Newbie
  • Posts: 38
Re: Discord Lorebot
« Reply #1 on: June 19, 2017, 10:53:51 PM »
i really like the sound of a lorebot

but i have a policy about downloading mysterious stuff from programming wizards with russian sounding names  :D

Oligo

  • Immortal
  • Fodder
  • *
  • Posts: 78
  • Favorite Zone: Dunmir
Re: Discord Lorebot
« Reply #2 on: June 20, 2017, 12:10:02 AM »
but i have a policy about downloading mysterious stuff from programming wizards with russian sounding names  :D

It's all open source, so you can view the source code yourself and see there's nothing malicious in it.
Also russian programming wizards would be Jaba (created JMC while playing Arctic) and Shesh.
I'm a mere novice in comparison.

Thymorical

  • Fodder
  • *
  • Posts: 91
  • Favorite Zone: Abyss
Re: Discord Lorebot
« Reply #3 on: June 20, 2017, 04:37:48 AM »
Does lore bot still not work when idle user?

sam

  • Newbie
  • Posts: 6
Re: Discord Lorebot
« Reply #4 on: June 20, 2017, 06:14:54 AM »
but i have a policy about downloading mysterious stuff from programming wizards with russian sounding names  :D

It's all open source, so you can view the source code yourself and see there's nothing malicious in it.
Also russian programming wizards would be Jaba (created JMC while playing Arctic) and Shesh.
I'm a mere novice in comparison.

such humbleness from a person who controlled 10 chars at once and won in a pk fight against 10 human chars!

Oligo

  • Immortal
  • Fodder
  • *
  • Posts: 78
  • Favorite Zone: Dunmir
Re: Discord Lorebot
« Reply #5 on: June 20, 2017, 08:03:17 AM »
Does lore bot still not work when idle user?
Lorebot runs and responds regardless if user is idle or not.
Lorebot is currently setup to run as a daemon process, so it doesn't require human intervention.
It's actively running in the Amazon cloud right now so it's on 24/7.

It uses a npm library called forever.

Code: [Select]
forever start lorebot.js
The current Discord version of Lorebot is much more responsive than the prior Skype and IRC incarnations, a credit to Discord's API.
The idle behavior you're referring to was a limitation of Skype's API.

Long term plan is to also integrate it directly into MUSHClient once I expose its services as a RESTful API.
« Last Edit: June 20, 2017, 08:48:45 AM by Oligo »

Flair

  • Guardian
  • Newbie
  • **
  • Posts: 40
Re: Discord Lorebot
« Reply #6 on: June 20, 2017, 10:25:45 AM »
Hit me up over email or here Oligo, if you want some input code for your bot.  The one I did allows for people to add to the DB, as well as search by affect/effect

Oligo

  • Immortal
  • Fodder
  • *
  • Posts: 78
  • Favorite Zone: Dunmir
Re: Discord Lorebot
« Reply #7 on: June 20, 2017, 11:02:38 AM »
Hit me up over email or here Oligo, if you want some input code for your bot.  The one I did allows for people to add to the DB, as well as search by affect/effect

Ok appreciate the offer. I don't foresee any roadblocks currently and of course another contributor is always welcome on Github. I'd been nursing along Trogg's original XML schema from 2003 thru various IRC and Skype versions of Lorebot. But for Discord I finally took the time to write a script and load the XML into MySQL so now searching by Affect, Worn, Mat Class, Value, etc should be trivial to implement in the coming weeks.
« Last Edit: June 20, 2017, 01:02:33 PM by Oligo »

Flair

  • Guardian
  • Newbie
  • **
  • Posts: 40
Re: Discord Lorebot
« Reply #8 on: June 20, 2017, 05:33:02 PM »
Sure thing, I'll fork and PR against yours :)  I have a Mongo version with schema as well

Thymorical

  • Fodder
  • *
  • Posts: 91
  • Favorite Zone: Abyss
Re: Discord Lorebot
« Reply #9 on: June 24, 2017, 09:03:14 AM »
Fun ideas

Oligo

  • Immortal
  • Fodder
  • *
  • Posts: 78
  • Favorite Zone: Dunmir
Re: Discord Lorebot
« Reply #10 on: June 24, 2017, 09:47:25 AM »
The features you describe Flair, like querying and capturing lores which are pasted in chat, Lorebot now has. I just need to port over look captures and I think I'll be done with this little project for now unless I get bored enough to turn it into a REST web service. I guess main differences in our implementations is backend choice of NoSQL vs SQL. Not sure if you're using Python or JS or some other language.
Flexible querying led me to discover some interesting items amassed over the years to cleanup in Lorebot.

Oligo
Code: [Select]
!query item_type=mounted
LoreBot
Code: [Select]
1 item found.
Object 'phreds mom dog animal'

Oligo
Code: [Select]
!stat phreds.mom.dog
LoreBot
Code: [Select]
1 item found for 'phreds.mom.dog'
Object 'phreds mom dog animal'
Item Type: mounted
Mat Class: pale         Material : dirty
Weight   : 332233       Value    : null
Affects  : INT           by -20
Effects  : sexual satisfaction
Item is  : UGLY
Restricts: NONE
Submitter: johnweeee (Mon Jan 26 2004 00:40:05 GMT-0600 (CST))


« Last Edit: June 24, 2017, 10:07:44 AM by Oligo »

Flair

  • Guardian
  • Newbie
  • **
  • Posts: 40
Re: Discord Lorebot
« Reply #11 on: June 24, 2017, 01:20:49 PM »
Really awesome!  Mine is built basically just for my needs and done in a single JS file, using a single document model (Mongoose ORM).

I'm looking into getting yours setup on a droplet, and testing it here in the coming days :)  Great work as per usual!

Oligo

  • Immortal
  • Fodder
  • *
  • Posts: 78
  • Favorite Zone: Dunmir
Re: Discord Lorebot
« Reply #12 on: July 18, 2017, 01:07:14 AM »
Lorebot has passed 4,800 unique lores and setup documentation has been improved.

Oligo

  • Immortal
  • Fodder
  • *
  • Posts: 78
  • Favorite Zone: Dunmir
Re: Discord Lorebot
« Reply #13 on: July 19, 2017, 10:43:56 PM »
fyi - since RISE is done this wipe - Lorebot is now open for public

https://discord.gg/vNuGEpA

Feel free to join and try it out