{"id":16876289,"url":"https://github.com/coolcat467/statusbot","last_synced_at":"2025-03-18T19:35:29.328Z","repository":{"id":103143562,"uuid":"382386627","full_name":"CoolCat467/StatusBot","owner":"CoolCat467","description":"StatusBot is a discord bot that will post information about a given Java Editon minecraft server in a given channel once configured.","archived":false,"fork":false,"pushed_at":"2024-05-27T23:05:33.000Z","size":408,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-28T08:28:32.859Z","etag":null,"topics":["bot","discord","discord-bot","java-edition","minecraft","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CoolCat467.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-02T15:22:27.000Z","updated_at":"2024-05-30T01:17:46.939Z","dependencies_parsed_at":"2023-11-27T07:29:00.022Z","dependency_job_id":"e9f14b28-e786-40d8-b019-d66c91711d1e","html_url":"https://github.com/CoolCat467/StatusBot","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoolCat467%2FStatusBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoolCat467%2FStatusBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoolCat467%2FStatusBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoolCat467%2FStatusBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CoolCat467","download_url":"https://codeload.github.com/CoolCat467/StatusBot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244289670,"owners_count":20429234,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","discord","discord-bot","java-edition","minecraft","python3"],"created_at":"2024-10-13T15:38:53.696Z","updated_at":"2025-03-18T19:35:24.319Z","avatar_url":"https://github.com/CoolCat467.png","language":"Python","readme":"# StatusBot\nStatusBot is a discord bot that will post information about a given Java Editon minecraft server in a given channel once configured.\n\n\u003c!-- BADGIE TIME --\u003e\n\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)\n[![code style: black](https://img.shields.io/badge/code_style-black-000000.svg)](https://github.com/psf/black)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\n\u003c!-- END BADGIE TIME --\u003e\n\n## Invite to your server\nInvite StatusBot to your discord server:\n[Invite link](https://discord.com/api/oauth2/authorize?client_id=859890649535873044\u0026permissions=274877910016\u0026scope=bot)\nNote, there may be random downtimes if problems occur, and because of the nature of\nthis bot whoever runs the bot will have access to the address of your minecraft server and\nthe name of the channel the bot will be sending messages in.\nPrevent random people from joining your minecraft server by setting up a whitelist.\nThey will find your public server eventually anyways; People are scanning the internet\nconstantly.\n\n\n## Installation\nFor Fresh install use this command:\n`/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/CoolCat467/StatusBot/HEAD/scripts/install.sh)\"`\n\nFor update installation use this command:\n`/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/CoolCat467/StatusBot/HEAD/scripts/install_update.sh)\"`\n\n\n## Usage\nAs far as I can tell, StatusBot only needs the following permissions integer: `68608`\nIf you perform a fresh install, you will need to set the discord token the bot will use.\nThe program looks for this token in a file named `.env`. If you use the fresh installer,\nthe installer will automatically create this file and open it with `nano` for you to paste\nyour token. If you use the update installer, it will move the old version to `old` and copy\nthe old `.env` to the new folder.\n\nAt the moment, StatusBot must install in `~/Desktop/Bots/StatusBot`. This will\nprobably change in the future because that's a bit of an odd limitation, don't\nyou think? If you absolutely must change the install directory, run `create_installers.sh`.\nThis will likely become a built-in part of installing StatusBot in the future.\n\nIn both installation cases, `looprun.sh` will be run, which will start the bot and restart\nit in the event of a critical error.\n\nEvery time after you install the bot, all you have to do is run `looprun.sh` or just\n`run.sh`. Looprun will simply call the run script forever.\n\nIn the event of an error, information about the error is stored in `log.txt` in StatusBot's\nfolder.\n\n## Using this bot\nStatusBot's command prefix is, on default, `!status`. The actual capitalization of\nmost commands does not matter. StatusBot should respond to the user in the channel\nthey entered the command in, except in the case that the channel does not support\nbeing written to.\n\n## Commands\nAs of version 0.5.0, the following describes StatusBot's commands.\n\n### In Guilds:\n`help` - Display all of StatusBot's valid guild commands.\n\n`refresh [force]` - Refresh, or re-evaluate, the guild that the command message is sent in.\n Restarts server pinger if guild `address` value is set.\n\n If 'force' is given as an additional argument and user is either\n the guild owner, StatusBot's owner, or a user in the `force-refresh-users` list,\n then you can force the guild server pinger to restart. Otherwise it only restarts if\n it needs too.\n\n`set-option \u003cname\u003e \u003cvalue\u003e` - Set option \u003cname\u003e to \u003cvalue\u003e for the guild you are currently\n  talking to StatusBot in.\n\n  If you are StatusBot's owner, you are the guild owner, or you are in the\n  `set-option-users` list, the following settings can be modified:\n\n   `address` - Address of the java editon minecraft server StatusBot should monitor\n\n   `channel` - Name of the discord channel StatusBot should post player leave-join messages in.\n\n   `force-refresh-users` - List of user IDs able to perform a force refresh.\n\n  If you are either StatusBot's owner or you are the guild owner, you modify the\n  `set-option-users` list.\n\n  All of the following options take 'clear', a user id, or a username (including discriminator),\n  to add to list as an argument.\n\n   `set-option-users` - List of user IDs able to modify `address` and `channel` values.\n\n`get-option \u003cname\u003e` - Tell you the value of option \u003cname\u003e. Anyone can retrieve any option.\n\n`my-id` - Tell the user who sent the message what their unique discord id is.\n\n`json` - Tell the user who sent the message the last json received from pinging the server.\n\n`online` - Tell the user who sent the message the last received list of known online players.\n\n`ping` - Tell the user who sent the message the latency of the connection to the server.\n\n`favicon` - Post a picture of the server's favicon in the channel the command message was posted in.\n\n`current-version` - Tell the user the current version of StatusBot.\n\n`online-version` - Tell the user the current online version of StatusBot.\nThis value is controlled by `version.txt` in this repository.\n\n\n### In a DM:\n`help` - Display all of StatusBot's valid DM commands.\n\n`set-option \u003cname\u003e \u003cvalue\u003e` - Set global dm option \u003cname\u003e to \u003cvalue\u003e\n\n All of the following options take 'clear', a user id, or a username (including discriminator),\n to add to list as an argument.\n\n   `set-option-users` - List of users who can modify the `update-users` and `stop-users` lists.\n\n  NOTE: This option can only be set by the bot owner.\n\n   The following two options can only be set by users in the `set-option-users` list.\n\n   `update-users` - List of users who can run the `update` dm command\n\n   `stop-users` - List of users who can run the `stop` dm command\n\n`get-option \u003cname\u003e` - Get global dm option \u003cname\u003e\n\n get-option in a dm is a bit different than it's counterpart in guild commands.\n This version of getoption will only tell the user the values of the given option\n if they are either the bot owner or in the `set-option-users` list.\n\n`stop` - Stop the bot. If `looprun.sh` was used, this has the effect of restarting the bot.\n\n  NOTE: This command will only work if you are in the `stop-users` list in the\n  global dms config file.\n\n`update` - Attempt to update the bot to the newest version using this github repository.\n\n  NOTE: This command is nearly identically to the `stop` dm command, but uses the\n  `update-users` global dm config value instead.\n\n`my-id` - Tell the user who sent the message what their unique discord id is.\n\n`current-version` - Tell the user the current version of StatusBot.\n\n`online-version` - Tell the user the current online version of StatusBot.\nThis value is controlled by `version.txt` in this repository.\n\n\n## Automatic messaging\nWhen StatusBot is connected to a guild and has it's `address` (and preferably also it's `channel`)\nvalue set, StatusBot will go to the channel defined by the `channel` option (if unset, goes to first\nany channels with `bot` in the title, then `general`, and if that fails then a random text channel)\nand post the following message: `Server pinger started.` As long as the pinger is running every 60\nseconds (on default) StatusBot will connect to and ping the server found at `address` and see if\nany players have joined or left since the last time it pinged said server. If any players have\njoined or left the server, StatusBot will tell you!\n\n\n## Credits\nParts of code stolen from WOOF (Web Offer One File) from https://github.com/simon-budig/woof\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoolcat467%2Fstatusbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoolcat467%2Fstatusbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoolcat467%2Fstatusbot/lists"}