lajp / geoguessr-bot-rs

A Discord bot for sending GeoGuessr challenge links that uses the GeoGuessr API written in rust.
6 stars 0 forks source link
bot discord discord-bot geoguessr geoguessr-bot rust

GeoGuessr-bot-rs

This is a simple implementation of a discord bot that send GeoGuessr-challenge links on demand.

IMPORTANT NOTICE FOR USERS

IF YOU ARE PLANNING TO HOST THIS BOT, PLEASE DO KEEP IN MIND THAT IT AGAINST GEOGUESSR'S TERMS OF SERVICE TO HOST A PUBLIC INSTANCE OF THIS BOT AND HOSTING ONE WILL MOST LIKELY GET YOUR GEOGUESSR ACCOUNT DISABLED

Features:

Requirements:

Setup:

An example of the .env file

DISCORD_TOKEN=YourBotsToken
APPLICATION_ID=YourBotsAppId

GEOGUESSR_AUTH_TOKEN=YourLoginCookies

RUST_LOG=info

Run the compiled binary (Remember to setup your .env)

./target/release/geoguessr-bot-rs

How the Bot works

The bot works by calling the (undocumented) GeoGuessr-API with reverse-engineered http-request-calls. This allows the bot to be lightning-fast and reliable even in multi-user applications. As a side product, the bot is able to generate challenges that are not possible to be created with the GeoGuessr-UI but that are still allowed by the API (such as challenges with massive/tiny per-round time limits). The bot authenticates with cookies specified in the .env-file.

Usage

Basically:

In discord, just start typing /geo on a channel on which the bot has access to and follow the suggested entries.

Walkthrough of different subcommands and ther suboptions:

There are 3 main subcommands (modes) of the /geo slash-command. Those are used to specify the gamemode. Available gamemodes at this point are streaks, classic and battle-royale.

These subcommands have their own suboptions that are specified as follows:

/geo mode streaks

streaktype:
moving:
panning:
zooming:
time:

/geo mode classic

map:

Internally the bot queries the GeoGuessr-API and chooses the 1st result. The results are the same that show up while using the search function on the GeoGuessr website.

moving:
panning:
zooming:
time:

/geo mode battle-royale

lobby:

If no lobby is specified all the other options will be ignored and a lobby will be created. The url for the created lobby will then be returned as an answer to the slash-command.

gametype:
moving:
panning:
zooming:
time:
spy:
5050: