GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - jessupthefish/discBot: Discord bot for Magic: The Gathering card lookup through the Scryfall API, with OpenAI-backed question answering.

BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
bot.py
bot.py
 
 

Repository files navigation

discBot

A Discord bot for Magic: The Gathering card lookup, with an OpenAI-backed question command attached. Built to run on a free always-on host, so it ships a tiny Flask keep-alive server for uptime pingers to hit.

Commands

Command What it does
!ping Health check. Replies Pong!
!card <name> Fuzzy-matches a card through the Scryfall API and posts its name and image
!ask <prompt> Sends the prompt to OpenAI and returns the reply, truncated to Discord's 2000-character limit

Setup

python -m venv venv && source venv/bin/activate
pip install discord.py requests openai flask python-dotenv

Create a .env file (gitignored):

DISCORD_BOT_TOKEN=your_bot_token
OPENAI_API_KEY=your_openai_key

Then:

python bot.py

The bot needs the Message Content privileged intent enabled in the Discord developer portal, since it reads command text from messages.

Keep-alive

keep_alive() starts a Flask server on port 8080 that returns I'm alive!. Point an uptime pinger at it to stop a free-tier host from idling the process out. Drop it if you are running somewhere that stays up on its own.

About

Discord bot for Magic: The Gathering card lookup through the Scryfall API, with OpenAI-backed question answering.

Topics

discord-botmagic-the-gatheringopenaipythonscryfall

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.