Skip to content

FahadBinHussain/wallabot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wallabot

This Python script is a Discord bot that extracts the title and saves a link to Wallabag from article sites like Wall Street Journal, New York Times, The Economist, Business Insider, Financial Times etc. shared in a specified channel.

Setup

Critical prerequisites to install

  • run pip3 install -r requirements.txt

  • Rename the file .env.dev to .env

Step 1: Create a Discord bot

  1. Go to https://discord.com/developers/applications create an application

image-17.png

  1. Build a Discord bot under the application

image.png

  1. Click Reset Token and then copy the token

image.png

  1. Turn ALL INTENT ON

image.png

  1. Invite your bot to your server via OAuth2 URL Generator

image.png

Step 2: Create a wallabag account

  1. Go to https://wallabag.nixnet.services/login and create account

image-28.png

  1. Store the Username and Password to .env under the USERNAME and PASSWORD

image.png

Step 3: Official API authentication

Generate Client ID and Client Secret

  1. Go to https://wallabag.nixnet.services/developer

  2. Click CREATE A NEW CLIENT

image.png

  1. Fill the Name of the client, Click CREATE A NEW CLIENT again

image.png

  1. Store the Client ID and Client Secret to .env under the CLIENT_ID and CLIENT_SECRET

image.png

  1. You're all set for Step 3

Step 3: Run the bot on the desktop

  1. Open a terminal or command prompt

  2. Navigate to the directory where you cloned the wallabot

  3. Run python3 main.py to start the bot

Have a good chat!

Optional: For a specific channel

  1. Right-click the channel you want the bot to listen for messages, Copy ID

image.png

  1. paste it into .env under DISCORD_CHANNEL_ID

image.png