Skip to content

Latest commit

 

History

History
135 lines (100 loc) · 3.3 KB

README.md

File metadata and controls

135 lines (100 loc) · 3.3 KB

Anonimalus

The Anonimalus



Description

Send anonymous messages to channels on servers where this bot is available. Also you can send anonymous messages directly to users who has at least one common server with this bot.

Commands

Command Syntax Description
dm !dm user_id message Send a message to user
send !send channel_id message Send a message to guild channel
howto !howto Show how to copy ids
help !help Show a short resume of bots features

It is also possible to send messages from this site page.

Project structure

  • Main codebase /*
    • Bot /lib/commands/*, /lib/EventHandler.js
    • Api /lib/api/*
  • Website /www

Both of them has their own node_modules

Quick start

Clone and install dependencies

git clone https://github.com/wvovaw/anonimalus.git
cd anonimalus
npm install

Register new discord app

  1. Go to devportal
  2. Create new app, go to bot section
  3. Copy a secret token
  4. Make sure SERVER MEMBERS INTENT option is enabled
  5. Save

Authentication

Create .env file and set DISCORD_TOKEN variable in there.

echo DISCORD_TOKEN="YourTokenGoesHere" > .env

Run bot

npm start

This setup runs localy on your machine, or on VDS/VPS

Deploying on Heroku

  1. Fork this repo
  2. Sign up on Heroku
  3. Connect your github
  4. Create new dino from your github repo
  5. Add DISCORD_TOKEN in variables (how to)
  6. Sign up here and create a cron job that will ping your app every 15-30 minutes to keep your app alive

Website

Developing

Go to /www directory and run

gridsome develop

It will run developing server with hot reload

Build and deploy

Compile the static website to /dist directory

npm run web-build

Before you perform deploying, add your repository as origin

git add origin https://github.com/yourname/reponame

Push the /dist dir to the remote on gh-pages branch. The site will be avaliable at https://yourname.github.io/anonimalus

npm run web-deploy

If you want to use the website to send messages

Make sure the last 2 lines is not commented out in app.js

const { start } = require('./lib/api/server');
start(eventHandler);

Change the url of POST request in Anonimalus\www\src\components\Form.vue

axios({
  method: 'post',
  url: 'https://yourappname.herokuapp.com/send',
  data: d
  })
  ...