mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
Fix discord clearActivity, menu
The callback sends multiple events, in particular two pause when going to the next song, so the timeout wasn't properly cleared. Add menu buttons for the two options
This commit is contained in:
21
plugins/discord/menu.js
Normal file
21
plugins/discord/menu.js
Normal file
@ -0,0 +1,21 @@
|
||||
const { setOptions } = require("../../config/plugins");
|
||||
const { edit } = require("../../config");
|
||||
|
||||
module.exports = (win, options) => [
|
||||
{
|
||||
label: "Clear activity after timeout",
|
||||
type: "checkbox",
|
||||
checked: options.activityTimoutEnabled,
|
||||
click: (item) => {
|
||||
options.activityTimoutEnabled = item.checked;
|
||||
setOptions('discord', options);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "Set timeout time in config",
|
||||
click: () => {
|
||||
// open config.json
|
||||
edit();
|
||||
},
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user