The main idea is if the user take a screenshot of any chose by own Game/Application, taken screenshot will send to Discord channel.
If you don't use GUI you should have to set BOT_TOKEN, CHANNEL_ID, GAME_TITLE and SERVER_ID environment variables.
- Where can you get the
BotToken? Follow the next link:https://docs.discordnet.dev/guides/getting_started/first-bot.html - Take
ServerIdandChannelIdfrom your Discord Server. - Take the game title from the top left corner of the game window
But if you use GUI you should have to enter Game Title, Channel Id, Server Id to TextBoxes. The program will automatically update the data inside after typing. Also, you need to set BOT_TOKEN to windows envs. See 3 options above.
- C# 12.0
- .Net 8.0
- WPF
- Discord API, Discord.Net, Discord Bots
- FileSystemWatcher
- Nito.AsyncEx (A helper library for the Task-Based Asynchronous Pattern (TAP));
https://github.com/StephenCleary/AsyncEx
JetBrains Rider IDE was used for developing so, just open a Solution (GView.sln) and press Run.
To build exe file you need to click right on your Solution & select Publish option.
Click it, choose Local Folder and then select a target runtime as win-x64, deployment mode as Framework-Dependent(?)
and there are checkboxes:
- produce single file
- include native libraries for self extract(?)
- enable ReadyToRun compilation(?)
- delete existing files
(check these options) and click run.
Application save logs to
${YOUR_WIN_PARTITION}:\Users\${YOUR_USER_DIRECTORY}\AppData\Local\GView
https://stackoverflow.com/questions/623451/how-can-i-make-my-own-event-in-chttps://habr.com/ru/companies/fuse8/articles/809467/
https://discord.com/developers/docs/resources/applicationhttps://discord.com/developers/applicationshttps://learn.microsoft.com/en-us/archive/blogs/toub/low-level-keyboard-hook-in-chttps://stackoverflow.com/questions/39702704/connecting-uwp-apps-hosted-by-applicationframehost-to-their-real-processeshttps://stackoverflow.com/questions/21103669/how-do-i-create-an-event-loop-message-pipe-in-a-console-applicationhttps://stackoverflow.com/questions/604410/global-keyboard-capture-in-c-sharp-applicationhttps://stackoverflow.com/questions/7268302/get-the-titles-of-all-open-windowshttps://stackoverflow.com/questions/277085/how-do-i-getmodulefilename-if-i-only-have-a-window-handle-hwndhttps://stackoverflow.com/questions/76481119/how-to-build-an-exe-in-jetbrains-riderhttps://stackoverflow.com/questions/21447223/selecting-random-nodes-from-xml-filehttps://learn.microsoft.com/en-us/dotnet/standard/threading/timers