Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mallusrgreatv2/discodoodle
https://github.com/mallusrgreatv2/discodoodle
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/mallusrgreatv2/discodoodle
- Owner: mallusrgreatv2
- Created: 2024-02-03T17:33:55.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-02-03T18:51:57.000Z (11 months ago)
- Last Synced: 2024-02-04T19:20:49.795Z (11 months ago)
- Language: JavaScript
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# discodoodle
Helpers for making Discord-related things.
## Features
- Fully type-safe
- Easy to use
- Fastens your development## Installation
```sh
npm i discodoodle
yarn add discodoodle
pnpm add discodoodle
```## Usage
```js
// esm
import discodoodle from "discodoodle";
// require
const discodoodle = require("discodoodle");
```### Convert time to Discord timestamp
This simple function helps you to convert unix epoch time (milliseconds) to Discord timestamps.
#### Code
```js
discodoodle.convertTimeToDiscord(Date.now() - 3_000, "R")
```### Result
The result (when sent on Discord as a message) should show as "3 seconds ago".