Coder Social home page Coder Social logo

spacexlaunchbot / spacexlaunchbot Goto Github PK

View Code? Open in Web Editor NEW
68.0 68.0 25.0 1.25 MB

A Discord bot for getting news, information, and notifications about upcoming SpaceX launches

Home Page: https://spacexlaunchbot.dev/

License: GNU General Public License v3.0

Python 99.05% Dockerfile 0.95%
discord discord-bot spacex spacex-launches spacexbot

spacexlaunchbot's Introduction

SpaceX Launch Bot

SpaceXLaunchBot status SpaceXLaunchBot server count SpaceXLaunchBot owner id
Discord Invite Discord Support Server Invite
Github CI Build Status Black code formatter

A Discord bot for getting news, information, and notifications about upcoming SpaceX launches. Get update notifications with the latest launch information and reminders for launches that will be happening soon.

See the official SpaceXLaunchBot website!

Commands

Command Description Permissions needed
nextlaunch Send the latest launch schedule message to the current channel None
launch [launch number] Send the launch schedule message for the given launch number to the current channel None
add [type] [mentions] Add the current channel to the notification service with the given notification type (all, schedule, or launch). If you chose all or launch, the second part can be a list of roles / channels / users to ping when a launch notification is sent Admin
remove Remove the current channel from the notification service Admin
info Send information about the bot to the current channel None
help List these commands None

Notifications

The add command allows admins to subscribe text channels to the bots notification service. This will send the subscribed channel different types of messages:

  • A schedule notification shows detailed information about the next upcoming launch. This message is sent every time the next upcoming launch has changed, e.g. if a launch date is changed or if a launch just happened so now the next upcoming launch is different. Currently changes are checked for every 60 seconds.

launch_info

  • A launch notification provides useful links to things such as the livestream and press kit. This message is only sent through the notification service and will be sent 30 minutes before a launch. You can choose to have a list of mentions sent to alert users to this notification.

launch_soon

If you want to receive both types of notification you can use all.

Currently there is no way to update the type and/or mentions you have set for a channel. If you need to change these just call remove and then add with your new options.

New Features

See the Github project page for planned updates.

If you want to request a feature, open an issue.

spacexlaunchbot's People

Contributors

luidiblu avatar pgrimaud avatar psidex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spacexlaunchbot's Issues

Database restart causes issues

Bug:

  • Postgres was restarted with SLB still running, SLB seemed to successfully reconnect but the start_db_counts_loop appears to have hung at some point, not finishing but also not inserting anything else into the db until SLB was restarted.

Cause:

  • Restarting Postgres independently to restarting SLB

Fix:

  • Identify what caused the hang (if it was hanging, if not, whatever happened) and fix it!

Notes:

  • asyncpg's connection pools handle reconnection automatically, so it probably wasn't something like not having a connection at all
  • Test out restarting pg and see if the bug can be recreated
  • After some more investigation it seems possible that the database was restarted during a call to ds.update_counts

Move To Launch Library 2 API

SpaceX-API seems to be struggling with updating data, and has announced it's probably going to start winding down it's services at some point in the future. LL2 seems like the best option to move to (as reccomended by the SpaceX-API dev).

can this be self hosted?

and how would I go about doing it? i see theres a docker deploy repo, but i use a raspberry pi.

looks like everything thats needed is in the directories. whats the difference between spacexlaunchbot/ and spacexlaunchbot/spacexlaunchbot/ ?

Error when deploying

When trying to deploy a python TypeError occurs. Below is the log.

2020-05-27 12:30:10,218 : INFO : discordclient : __init__ : Client initialised Traceback (most recent call last): File "./spacexlaunchbot/main.py", line 15, in <module> main() File "./spacexlaunchbot/main.py", line 10, in main client = discordclient.SpaceXLaunchBotClient() File "/opt/SpaceXLaunchBot/spacexlaunchbot/discordclient.py", line 25, in __init__ self.loop.add_signal_handler(signal.SIGTERM, self.shutdown) File "/usr/local/lib/python3.8/asyncio/unix_events.py", line 86, in add_signal_handler raise TypeError("coroutines cannot be used " TypeError: coroutines cannot be used with add_signal_handler()

config and launch

where config the bot and what command to start it please ?
There are no informations about that.
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.