# Twitter

## <mark style="color:red;">Server Admin Commands</mark>

### `/twitter-raid`

Create a tweet raid event where users can earn rewards for interacting with a Twitter/X post. Users can earn points for liking, retweeting, commenting, and bookmarking the tweet.

<figure><img src="https://830634877-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0OjTorGMztj18rxBEu9d%2Fuploads%2FFSJn0yJ4pn9j9rL45nCg%2Fimage.png?alt=media&#x26;token=92b9a104-5315-4b18-8975-f1804a4fb961" alt="" width="480"><figcaption></figcaption></figure>

### Required Default Permissions

* Requires `Manage Server` permission to use
* Bot needs `Send Messages`, `Read Messages`, and `Manage Messages` permissions in the target channel

### Cooldown

* Maximum 10 uses per server per 24 hours (meaning you can post upto 10 raids a day :fire:)

### Parameters

#### Required Parameters:

1. `tweet_url` - The URL of the tweet to raid (must be a valid Twitter/X post URL)
2. `ping_role` - The role to ping when the raid starts

#### Optional Parameters:

1. `duration_in_hours` (Default: 24 hrs)
   * How long the raid should last
   * Range: 0.01 to 48 hours
   * Example: 24.0 for 1 day, 0.5 for 30 minutes
2. `channel` (Default: Current channel)
   * The channel where the raid UI will be posted
3. `custom_message` (Default: None)
   * A message message that goes with the posted raid.

#### Reward Parameters (Default: Last Used):

* `like_reward` - Points awarded for liking
* `retweet_reward` - Points awarded for retweeting
* `comment_reward` - Points awarded for commenting
* `bookmark_reward` - Points awarded for bookmarking

#### Expected Count Parameters (Default: Last Used):

* `required_likes_count` - Number of likes needed
* `required_retweets_count` - Number of retweets needed
* `required_comments_count` - Number of comments needed
* `required_bookmarks_count` - Number of bookmarks needed

<mark style="color:yellow;">If you don't enter the above parameters, the values you used in the last raid will automatically be used.</mark>

#### Special Parameters:

* `enable_proportional_rewards` (Default: False)
  * If True: Users get proportional points based on actual/required ratio. E.g. if the required count for likes was 100 but the post only reached 50 likes, the users will still be able to claim half the points.
  * If False: Users only get rewards if the required count for a specific action is reached.

### Usage Examples:

* **Basic raid with default settings:**

`/twitter-raid tweet_url:`[`https://x.com/user/status/123456789`](https://vscode-file/vscode-app/c:/Users/USR/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html) `ping_role:@Raiders`

*<mark style="color:yellow;">Default/Last used rewards points and count values will be used here so you don't have to type them again and again.</mark>*

* **Custom raid with specific rewards:**

`/twitter-raid tweet_url:`[`https://x.com/user/status/123456789`](https://vscode-file/vscode-app/c:/Users/USR/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html) `ping_role:@Raiders duration_in_hours:12 like_reward:100 retweet_reward:200 required_likes_count:50 required_retweets_count:25`

* **Proportional rewards raid:**

`/twitter-raid tweet_url:`[`https://x.com/user/status/123456789`](https://vscode-file/vscode-app/c:/Users/USR/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html) `ping_role:@Raiders enable_proportional_rewards:true like_reward:1000 required_likes_count:1000`

### Notes:

1. Set any reward to 0 to disable that interaction type
2. Users can only claim rewards after the raid duration ends and before 7 days past the end time
3. With proportional rewards:
   * For example, if goal is 100 likes and tweet gets 50, users get 50% of the reward
   * Or if goal is 100 likes and tweet gets 200, users get 200% of the reward
4. Without proportional rewards:
   * Users only get rewards if the counts required goal is met. E.g. if the the required likes on the post is set to 100, the users will only be able to claim points for likes if the post reaches 100+ likes.
   * No partial rewards are given
