Skip to content

🤖 A Discord bot that retrieves random Project Euler problems from projecteuler.net.

Notifications You must be signed in to change notification settings

carlcorder/project-euler-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Euler Bot

leonhard-euler

logo

A Discord bot that retrieves random Project Euler problems from projecteuler.net
let fetchProblem = (message) => {
  fetch(`${randomProblem()}`)
    .then((response) => response.text())
    .then(html => (new JSDOM(html)).window.document.getElementById(content_id).textContent)
    .then(text => message.channel.send(String.raw`${text}`))

Add to Your Server

invite-link

Then simply mention @Project Euler Bot and he will fetch you a problem to work on!

Local Installation

git clone git@github.com:carlcorder/project-euler-bot.git
cd project-euler-bot
npm install
node .

Heroku Deployment

heroku login
heroku git:clone -a project-euler-bot
cd project-euler-bot
git push heroku master
# stop web dyno and start a service worker
heroku ps
heroku ps:scale web=0
heroku ps:scale worker=1
heroku logs --tail

About

🤖 A Discord bot that retrieves random Project Euler problems from projecteuler.net.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •