Skip to content

Nanu00/searchio

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Search.IO

A Discord bot search engine implemented in Python

To use:

Install requirements with:

pip install -r requirements.txt

Obtain Discord bot credentials and place in a .env file in the same directory as main.py

DISCORD_TOKEN = [copy paste token]

Run main.py

To develop:

All search modules are imported from ./src

The modules each have the ability to send messages using discord.py.

Example:

https://github.com/ACEslava/wikipediasearch/blob/b6f1e54c185c3191a1496c817c27f5b59868dca9/src/wikipedia.py#L1-L17

  • Each module is required to be hooked up to the logging system
    • This can be done via:
    Log.appendToLog(ctx=discord.ext.commands.Context, command=str, args=str OR list)
    
  • The required instance attributes are:
  bot=discord.ext.commands.Bot
  ctx=discord.ext.commands.Context
  searchQuery=str
  • Optional instance attributes are:
  searchSettings=dict
  • The serverSettings.json (and by extension searchSettings attrib) are structured as follows:
  {
  guildID=int: {
      "adminrole": roleID=int OR None,
      "blacklist": [userID=int],
      "sudoer": [userID=int],
      "safesearch": bool,
      "wikipedia": bool,
      "scholar": bool,
      "google": bool,
      "mal": bool,
      "youtube": bool,
      "commandprefix": char
    }
  }
  

About

A Wikipedia article search engine implemented in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%