# swyft-discordtsx

> Discord bot with TSX syntax

Latest version **1.0.5** (published 2023-06-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install swyft-discordtsx
pnpm add swyft-discordtsx
yarn add swyft-discordtsx
bun add swyft-discordtsx
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2023-06-20 |
| First published | 2023-05-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 13 |
| Unpacked size | 58.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | SwyftPain |
| Maintainers | swyftpain |

## Links

- npm: https://www.npmjs.com/package/swyft-discordtsx
- Repository: https://github.com/SwyftPain/DiscordTSX-New
- Homepage: https://github.com/SwyftPain/DiscordTSX-New#readme
- Issues: https://github.com/SwyftPain/DiscordTSX-New/issues
- Funding: https://www.paypal.com/paypalme/mrjohnnyjo
- npm.io page: https://npm.io/package/swyft-discordtsx

## Dependencies (13)

- [axios](https://npm.io/package/axios.md) ^1.4.0
- [jsdom](https://npm.io/package/jsdom.md) ^22.0.0
- [react](https://npm.io/package/react.md) ^18.2.0
- [dotenv](https://npm.io/package/dotenv.md) ^16.0.3
- [express](https://npm.io/package/express.md) ^4.18.2
- [ts-node](https://npm.io/package/ts-node.md) ^10.9.1
- [react-dom](https://npm.io/package/react-dom.md) ^18.2.0
- [discord.js](https://npm.io/package/discord.js.md) ^14.11.0
- [@types/node](https://npm.io/package/@types/node.md) ^20.1.4
- [@types/jsdom](https://npm.io/package/@types/jsdom.md) ^21.1.1
- [@types/react](https://npm.io/package/@types/react.md) ^18.2.6
- [@types/express](https://npm.io/package/@types/express.md) ^4.17.17
- [@types/react-dom](https://npm.io/package/@types/react-dom.md) ^18.2.4

## Recent versions

- 1.0.5 (latest) — 2023-06-20
- 1.0.4 — 2023-06-19
- 1.0.3 — 2023-05-15
- 1.0.2 — 2023-05-15
- 1.0.1 — 2023-05-15
- 1.0.0 — 2023-05-15

## README

# DiscordTSX
 Discord bot with TSX syntax

``npm i swyft-discordtsx``

```tsx
import React from "react";
import {
  Command,
  Discord,
  Embed,
  EmbedField,
  Button,
  Text,
  ButtonResponse,
  EmbedAuthor,
  EmbedFooter,
} from "./components";
import { AuthorAvatar, AuthorUsername, Author } from "./shortcuts";
import * as dotenv from "dotenv";
dotenv.config();

const App = () => {
  return (
    <Discord token={process.env.TOKEN!} prefix="!">
      <Command name="ping">
        <Text>Hi {Author}</Text>
        <Embed
          title="embed title"
          thumbnail={AuthorAvatar}
          color="Yellow"
          timestamp={new Date()}
        >
          Some description
          <EmbedField name="field name 1" value="field value 1"></EmbedField>
          <EmbedField name="field name 1" value="field value 1"></EmbedField>
          <EmbedAuthor name="Author name" iconURL={AuthorAvatar}></EmbedAuthor>
          <EmbedFooter text="Footer text" iconURL={AuthorAvatar}></EmbedFooter>
        </Embed>
        <Button customId="Twitch" label="Twitch" style="Primary">
          <ButtonResponse>Twitch Button Response</ButtonResponse>
        </Button>
        <Button customId="YouTube" label="YouTube" style="Danger">
          <ButtonResponse>YouTube Button Response</ButtonResponse>
        </Button>
      </Command>
    </Discord>
  );
};

export default App;
```

## ToDo

+ enable stuff like AuthorUsername in places like author name, footer text and button response
+ completing button functionality (stuff like adding url, emoji, disabled, visible only to command author, etc)
+ Events such as creating channels or joining VoiceChat, etc
+ Actions such as banning or kicking a user, adding or removing a role, etc

---
_Source: https://npm.io/package/swyft-discordtsx · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
