no-time-to-explain

command module
v0.0.0-...-9efd305 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2024 License: MIT Imports: 8 Imported by: 0

README

No Time To Explain Bot

URL: https://ptb.discord.com/api/oauth2/authorize?client_id=1216152057862426694&permissions=2147485696&scope=bot%20applications.commands

Permissions:

  • Text - Send Messages
  • Text - Use Slash Commands

Usage

  1. In any channel, write "/time". This will post a timestamp message for the current time (default EDT timezone) that only you can see.
  2. Click the "Change Time" button, which will let you modify the timestamp to match your desired time.
  3. Select one of the available timestamp formats by hovering over the Discord tag (e.g. <t:1710605220:T>) and clicking the copy button that appears.
  4. Paste the Discord tag in any message wanting to reference that exact point in time. All readers will see the time according to their local timezones.
  5. Dismiss or reuse the message whenever you like!

Testing

This bot may be tested locally provided that you have a DISCORD_TOKEN environment variable set to a valid Discord token. You may manage your own token by creating an App at https://ptb.discord.com/developers/applications which will allow you to develop new features independently of the hosted bot (e.g. "production").

export DISCORD_TOKEN=xxxtokenxxx
go run main.go

Alternatively if you need to develop against the bot directly, coordinate with the repository owner(s) and we can shutdown the existing bot and distribute its token to you.

Persistence

By default the application runs with a memory-backed persistence layer. If you need to test the Redis persistence options you may point the application at a local Redis instance:

docker-compose up -d
REDIS_ADDR=127.0.0.1:6379 go run main.go

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL