Skip to content

Commit

Permalink
Set Watching activity type
Browse files Browse the repository at this point in the history
  • Loading branch information
BrutuZ committed Oct 5, 2024
1 parent d5bfdb7 commit 661e966
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Release

on:
workflow_dispatch:
release:
types: [created]

Expand All @@ -15,7 +16,7 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: "aarch64-unknown-linux-gnu, x86_64-unknown-linux-musl"
targets: 'aarch64-unknown-linux-gnu, x86_64-unknown-linux-musl'

- name: Build amd64
run: cargo build --release
Expand Down Expand Up @@ -88,7 +89,7 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: "aarch64-apple-darwin, x86_64-apple-darwin"
targets: 'aarch64-apple-darwin, x86_64-apple-darwin'

- name: Build darwin
run: cargo build --release --target=x86_64-apple-darwin
Expand Down
3 changes: 2 additions & 1 deletion src/discord.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use discord_rich_presence::{
activity::{Activity, Assets, Button, Timestamps},
activity::{Activity, ActivityType, Assets, Button, Timestamps},

Check failure on line 2 in src/discord.rs

View workflow job for this annotation

GitHub Actions / clippy

unresolved import `discord_rich_presence::activity::ActivityType`

error[E0432]: unresolved import `discord_rich_presence::activity::ActivityType` --> src/discord.rs:2:26 | 2 | activity::{Activity, ActivityType, Assets, Button, Timestamps}, | ^^^^^^^^^^^^ | | | no `ActivityType` in `activity` | help: a similar name exists in the module: `Activity`
DiscordIpc, DiscordIpcClient,
};
use std::{thread::sleep, time::Duration};
Expand Down Expand Up @@ -123,6 +123,7 @@ impl Discord {
let payload = Activity::new()
.details(&payload_data.details)
.state(&payload_data.state)
.activity_type(ActivityType::Watching)

Check failure on line 126 in src/discord.rs

View workflow job for this annotation

GitHub Actions / clippy

no method named `activity_type` found for struct `discord_rich_presence::activity::Activity` in the current scope

error[E0599]: no method named `activity_type` found for struct `discord_rich_presence::activity::Activity` in the current scope --> src/discord.rs:126:14 | 123 | let payload = Activity::new() | _______________________- 124 | | .details(&payload_data.details) 125 | | .state(&payload_data.state) 126 | | .activity_type(ActivityType::Watching) | | -^^^^^^^^^^^^^ method not found in `Activity<'_>` | |_____________| |
.assets(
Assets::new()
.large_image(&img)
Expand Down

0 comments on commit 661e966

Please sign in to comment.