├── .gitignore
├── GauPoints.sln
├── LICENSE
├── README.md
└── Sentinel
├── App.config
├── Config.Designer.cs
├── Config.settings
├── GauPoints.csproj
├── Program.cs
├── Properties
└── AssemblyInfo.cs
├── TelegramBetBot.cs
├── TwitchChatBot.cs
└── packages.config
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.suo
8 | *.user
9 | *.userosscache
10 | *.sln.docstates
11 |
12 | # User-specific files (MonoDevelop/Xamarin Studio)
13 | *.userprefs
14 |
15 | # Build results
16 | [Dd]ebug/
17 | [Dd]ebugPublic/
18 | [Rr]elease/
19 | [Rr]eleases/
20 | x64/
21 | x86/
22 | bld/
23 | [Bb]in/
24 | [Oo]bj/
25 | [Ll]og/
26 |
27 | # Visual Studio 2015/2017 cache/options directory
28 | .vs/
29 | # Uncomment if you have tasks that create the project's static files in wwwroot
30 | #wwwroot/
31 |
32 | # Visual Studio 2017 auto generated files
33 | Generated\ Files/
34 |
35 | # MSTest test Results
36 | [Tt]est[Rr]esult*/
37 | [Bb]uild[Ll]og.*
38 |
39 | # NUNIT
40 | *.VisualState.xml
41 | TestResult.xml
42 |
43 | # Build Results of an ATL Project
44 | [Dd]ebugPS/
45 | [Rr]eleasePS/
46 | dlldata.c
47 |
48 | # Benchmark Results
49 | BenchmarkDotNet.Artifacts/
50 |
51 | # .NET Core
52 | project.lock.json
53 | project.fragment.lock.json
54 | artifacts/
55 | **/Properties/launchSettings.json
56 |
57 | # StyleCop
58 | StyleCopReport.xml
59 |
60 | # Files built by Visual Studio
61 | *_i.c
62 | *_p.c
63 | *_i.h
64 | *.ilk
65 | *.meta
66 | *.obj
67 | *.iobj
68 | *.pch
69 | *.pdb
70 | *.ipdb
71 | *.pgc
72 | *.pgd
73 | *.rsp
74 | *.sbr
75 | *.tlb
76 | *.tli
77 | *.tlh
78 | *.tmp
79 | *.tmp_proj
80 | *.log
81 | *.vspscc
82 | *.vssscc
83 | .builds
84 | *.pidb
85 | *.svclog
86 | *.scc
87 |
88 | # Chutzpah Test files
89 | _Chutzpah*
90 |
91 | # Visual C++ cache files
92 | ipch/
93 | *.aps
94 | *.ncb
95 | *.opendb
96 | *.opensdf
97 | *.sdf
98 | *.cachefile
99 | *.VC.db
100 | *.VC.VC.opendb
101 |
102 | # Visual Studio profiler
103 | *.psess
104 | *.vsp
105 | *.vspx
106 | *.sap
107 |
108 | # Visual Studio Trace Files
109 | *.e2e
110 |
111 | # TFS 2012 Local Workspace
112 | $tf/
113 |
114 | # Guidance Automation Toolkit
115 | *.gpState
116 |
117 | # ReSharper is a .NET coding add-in
118 | _ReSharper*/
119 | *.[Rr]e[Ss]harper
120 | *.DotSettings.user
121 |
122 | # JustCode is a .NET coding add-in
123 | .JustCode
124 |
125 | # TeamCity is a build add-in
126 | _TeamCity*
127 |
128 | # DotCover is a Code Coverage Tool
129 | *.dotCover
130 |
131 | # AxoCover is a Code Coverage Tool
132 | .axoCover/*
133 | !.axoCover/settings.json
134 |
135 | # Visual Studio code coverage results
136 | *.coverage
137 | *.coveragexml
138 |
139 | # NCrunch
140 | _NCrunch_*
141 | .*crunch*.local.xml
142 | nCrunchTemp_*
143 |
144 | # MightyMoose
145 | *.mm.*
146 | AutoTest.Net/
147 |
148 | # Web workbench (sass)
149 | .sass-cache/
150 |
151 | # Installshield output folder
152 | [Ee]xpress/
153 |
154 | # DocProject is a documentation generator add-in
155 | DocProject/buildhelp/
156 | DocProject/Help/*.HxT
157 | DocProject/Help/*.HxC
158 | DocProject/Help/*.hhc
159 | DocProject/Help/*.hhk
160 | DocProject/Help/*.hhp
161 | DocProject/Help/Html2
162 | DocProject/Help/html
163 |
164 | # Click-Once directory
165 | publish/
166 |
167 | # Publish Web Output
168 | *.[Pp]ublish.xml
169 | *.azurePubxml
170 | # Note: Comment the next line if you want to checkin your web deploy settings,
171 | # but database connection strings (with potential passwords) will be unencrypted
172 | *.pubxml
173 | *.publishproj
174 |
175 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
176 | # checkin your Azure Web App publish settings, but sensitive information contained
177 | # in these scripts will be unencrypted
178 | PublishScripts/
179 |
180 | # NuGet Packages
181 | *.nupkg
182 | # The packages folder can be ignored because of Package Restore
183 | **/[Pp]ackages/*
184 | # except build/, which is used as an MSBuild target.
185 | !**/[Pp]ackages/build/
186 | # Uncomment if necessary however generally it will be regenerated when needed
187 | #!**/[Pp]ackages/repositories.config
188 | # NuGet v3's project.json files produces more ignorable files
189 | *.nuget.props
190 | *.nuget.targets
191 |
192 | # Microsoft Azure Build Output
193 | csx/
194 | *.build.csdef
195 |
196 | # Microsoft Azure Emulator
197 | ecf/
198 | rcf/
199 |
200 | # Windows Store app package directories and files
201 | AppPackages/
202 | BundleArtifacts/
203 | Package.StoreAssociation.xml
204 | _pkginfo.txt
205 | *.appx
206 |
207 | # Visual Studio cache files
208 | # files ending in .cache can be ignored
209 | *.[Cc]ache
210 | # but keep track of directories ending in .cache
211 | !*.[Cc]ache/
212 |
213 | # Others
214 | ClientBin/
215 | ~$*
216 | *~
217 | *.dbmdl
218 | *.dbproj.schemaview
219 | *.jfm
220 | *.pfx
221 | *.publishsettings
222 | orleans.codegen.cs
223 |
224 | # Including strong name files can present a security risk
225 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
226 | #*.snk
227 |
228 | # Since there are multiple workflows, uncomment next line to ignore bower_components
229 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
230 | #bower_components/
231 |
232 | # RIA/Silverlight projects
233 | Generated_Code/
234 |
235 | # Backup & report files from converting an old project file
236 | # to a newer Visual Studio version. Backup files are not needed,
237 | # because we have git ;-)
238 | _UpgradeReport_Files/
239 | Backup*/
240 | UpgradeLog*.XML
241 | UpgradeLog*.htm
242 | ServiceFabricBackup/
243 | *.rptproj.bak
244 |
245 | # SQL Server files
246 | *.mdf
247 | *.ldf
248 | *.ndf
249 |
250 | # Business Intelligence projects
251 | *.rdl.data
252 | *.bim.layout
253 | *.bim_*.settings
254 | *.rptproj.rsuser
255 |
256 | # Microsoft Fakes
257 | FakesAssemblies/
258 |
259 | # GhostDoc plugin setting file
260 | *.GhostDoc.xml
261 |
262 | # Node.js Tools for Visual Studio
263 | .ntvs_analysis.dat
264 | node_modules/
265 |
266 | # Visual Studio 6 build log
267 | *.plg
268 |
269 | # Visual Studio 6 workspace options file
270 | *.opt
271 |
272 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
273 | *.vbw
274 |
275 | # Visual Studio LightSwitch build output
276 | **/*.HTMLClient/GeneratedArtifacts
277 | **/*.DesktopClient/GeneratedArtifacts
278 | **/*.DesktopClient/ModelManifest.xml
279 | **/*.Server/GeneratedArtifacts
280 | **/*.Server/ModelManifest.xml
281 | _Pvt_Extensions
282 |
283 | # Paket dependency manager
284 | .paket/paket.exe
285 | paket-files/
286 |
287 | # FAKE - F# Make
288 | .fake/
289 |
290 | # JetBrains Rider
291 | .idea/
292 | *.sln.iml
293 |
294 | # CodeRush
295 | .cr/
296 |
297 | # Python Tools for Visual Studio (PTVS)
298 | __pycache__/
299 | *.pyc
300 |
301 | # Cake - Uncomment if you are using it
302 | # tools/**
303 | # !tools/packages.config
304 |
305 | # Tabs Studio
306 | *.tss
307 |
308 | # Telerik's JustMock configuration file
309 | *.jmconfig
310 |
311 | # BizTalk build output
312 | *.btp.cs
313 | *.btm.cs
314 | *.odx.cs
315 | *.xsd.cs
316 |
317 | # OpenCover UI analysis results
318 | OpenCover/
319 |
320 | # Azure Stream Analytics local run output
321 | ASALocalRun/
322 |
323 | # MSBuild Binary and Structured Log
324 | *.binlog
325 |
326 | # NVidia Nsight GPU debugger configuration file
327 | *.nvuser
328 |
329 | # MFractors (Xamarin productivity tool) working folder
330 | .mfractor/
331 |
--------------------------------------------------------------------------------
/GauPoints.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.28307.757
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GauPoints", "Sentinel\GauPoints.csproj", "{FDC15E5E-4712-401E-9E00-04F7BADB6420}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {FDC15E5E-4712-401E-9E00-04F7BADB6420}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {FDC15E5E-4712-401E-9E00-04F7BADB6420}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {FDC15E5E-4712-401E-9E00-04F7BADB6420}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {FDC15E5E-4712-401E-9E00-04F7BADB6420}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {1D638558-1FB3-4E4C-B1D0-9ED3AB5695FD}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Renato Gomes
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Stream Viewer and bets
2 | Bot para farmar guapoints e outras streams e fazer apostas nas mesmas
3 |
4 | A primeira coisa que você precisa para começar a utilizar esse bot é, um token da Twitch.
5 | Você pode gerar um em https://twitchtokengenerator.com/, basta conectar sua conta e escolher a opção de BotToken.
6 | Pronto,o site te deu um Token.
7 |
8 | Com o token em mãos, vá para página de releases, https://github.com/reegomes/StreamViewer/releases
9 | Baixe o arquivo BotFarm.7z e extraia onde preferir.
10 | Em seguida, abra o GauPoints.exe.config num bloco de notas ou editor de texto que preferir.
11 |
12 | 
13 |
14 | Conforme a imagem acima, onde estiver o texto em branco você vai apagar e adicionar as seguintes informações.
15 |
16 | 1° Você vai colocar seu token gerado anteriormente.
17 | 2° Depois seu usuário da Twitch, só o usuário, não precisa de senha.
18 | 3° O canal que deseja farmar seus pontinhos e que tenha o sistema de Farm da streamelements.
19 | 4° O ClientID ainda não é necessário, vou usar isso para outra coisa em breve.
20 | 5° Salve e feche, se você fez tudo certo, é só executar o Gaupoints.exe.
21 |
22 | Se você começou a ver o chat da Twitch.tv do canal que você escolheu, então deu tudo certo, pode ir fazer o que quiser.
23 | O streamer continua ganhando o viewer e você os pontos, então a troca é justa.
24 |
25 |
26 | Próximos passos:
27 | Adicionar uma integração do sistema de apostas via Telegram. (Já está em trabalho)
28 |
--------------------------------------------------------------------------------
/Sentinel/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | ihxwij1czovpbgxasnpf84wyde1weh
34 |
35 |
36 | reegomes
37 |
38 |
39 | gaules
40 |
41 |
42 | inawxdk7ublczaldhc86b519g4vjmw
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Sentinel/Config.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace GauPoints {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.2.0.0")]
16 | internal sealed partial class Config : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Config defaultInstance = ((Config)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Config())));
19 |
20 | public static Config Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 |
26 | [global::System.Configuration.UserScopedSettingAttribute()]
27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28 | [global::System.Configuration.DefaultSettingValueAttribute("ihxwij1czovpbgxasnpf84wyde1weh")]
29 | public string BotToken {
30 | get {
31 | return ((string)(this["BotToken"]));
32 | }
33 | set {
34 | this["BotToken"] = value;
35 | }
36 | }
37 |
38 | [global::System.Configuration.UserScopedSettingAttribute()]
39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
40 | [global::System.Configuration.DefaultSettingValueAttribute("reegomes")]
41 | public string BotUsername {
42 | get {
43 | return ((string)(this["BotUsername"]));
44 | }
45 | set {
46 | this["BotUsername"] = value;
47 | }
48 | }
49 |
50 | [global::System.Configuration.UserScopedSettingAttribute()]
51 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
52 | [global::System.Configuration.DefaultSettingValueAttribute("gaules")]
53 | public string ChannelName {
54 | get {
55 | return ((string)(this["ChannelName"]));
56 | }
57 | set {
58 | this["ChannelName"] = value;
59 | }
60 | }
61 |
62 | [global::System.Configuration.UserScopedSettingAttribute()]
63 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
64 | [global::System.Configuration.DefaultSettingValueAttribute("inawxdk7ublczaldhc86b519g4vjmw")]
65 | public string ClientID {
66 | get {
67 | return ((string)(this["ClientID"]));
68 | }
69 | set {
70 | this["ClientID"] = value;
71 | }
72 | }
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/Sentinel/Config.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ihxwij1czovpbgxasnpf84wyde1weh
7 |
8 |
9 | reegomes
10 |
11 |
12 | gaules
13 |
14 |
15 | inawxdk7ublczaldhc86b519g4vjmw
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Sentinel/GauPoints.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Debug
7 | AnyCPU
8 | {FDC15E5E-4712-401E-9E00-04F7BADB6420}
9 | Exe
10 | GauPoints
11 | GauPoints
12 | v4.7.2
13 | 512
14 | true
15 | true
16 | false
17 |
18 |
19 | C:\Users\Renato\Desktop\BotGaupoints\
20 | true
21 | Disk
22 | false
23 | Foreground
24 | 7
25 | Days
26 | false
27 | false
28 | true
29 | 0
30 | 1.0.0.%2a
31 | false
32 | true
33 | true
34 |
35 |
36 | AnyCPU
37 | true
38 | full
39 | false
40 | bin\Debug\
41 | DEBUG;TRACE
42 | prompt
43 | 4
44 |
45 |
46 | AnyCPU
47 | pdbonly
48 | true
49 | bin\Release\
50 | TRACE
51 | prompt
52 | 4
53 |
54 |
55 | GauPoints.Program
56 |
57 |
58 |
59 | ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll
60 |
61 |
62 | ..\packages\Microsoft.Extensions.Logging.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Logging.dll
63 |
64 |
65 | ..\packages\Microsoft.Extensions.Logging.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll
66 |
67 |
68 | ..\packages\Microsoft.Extensions.Options.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Options.dll
69 |
70 |
71 | ..\packages\Microsoft.Extensions.Primitives.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll
72 |
73 |
74 | ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll
75 |
76 |
77 | ..\packages\Serilog.2.3.0\lib\net46\Serilog.dll
78 |
79 |
80 | ..\packages\Serilog.Extensions.Logging.2.0.2\lib\net461\Serilog.Extensions.Logging.dll
81 |
82 |
83 |
84 |
85 |
86 |
87 | ..\packages\System.IO.4.3.0\lib\net462\System.IO.dll
88 | True
89 | True
90 |
91 |
92 | ..\packages\System.Net.Http.4.3.3\lib\net46\System.Net.Http.dll
93 | True
94 | True
95 |
96 |
97 | ..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll
98 | True
99 | True
100 |
101 |
102 | ..\packages\System.Runtime.CompilerServices.Unsafe.4.4.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll
103 |
104 |
105 | ..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll
106 | True
107 | True
108 |
109 |
110 | ..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll
111 | True
112 | True
113 |
114 |
115 | ..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll
116 | True
117 | True
118 |
119 |
120 | ..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll
121 | True
122 | True
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 | ..\packages\Telegram.Bot.15.0.0\lib\net45\Telegram.Bot.dll
131 |
132 |
133 | ..\packages\TwitchLib.Api.3.0.0\lib\netstandard2.0\TwitchLib.Api.dll
134 |
135 |
136 | ..\packages\TwitchLib.Api.Core.1.1.0\lib\netstandard2.0\TwitchLib.Api.Core.dll
137 |
138 |
139 | ..\packages\TwitchLib.Api.Core.Enums.1.1.0\lib\netstandard2.0\TwitchLib.Api.Core.Enums.dll
140 |
141 |
142 | ..\packages\TwitchLib.Api.Core.Interfaces.1.1.0\lib\netstandard2.0\TwitchLib.Api.Core.Interfaces.dll
143 |
144 |
145 | ..\packages\TwitchLib.Api.Core.Models.1.1.0\lib\netstandard2.0\TwitchLib.Api.Core.Models.dll
146 |
147 |
148 | ..\packages\TwitchLib.Api.Helix.1.1.0\lib\netstandard2.0\TwitchLib.Api.Helix.dll
149 |
150 |
151 | ..\packages\TwitchLib.Api.Helix.Models.1.1.0\lib\netstandard2.0\TwitchLib.Api.Helix.Models.dll
152 |
153 |
154 | ..\packages\TwitchLib.Api.V5.1.1.0\lib\netstandard2.0\TwitchLib.Api.V5.dll
155 |
156 |
157 | ..\packages\TwitchLib.Api.V5.Models.1.1.0\lib\netstandard2.0\TwitchLib.Api.V5.Models.dll
158 |
159 |
160 | ..\packages\TwitchLib.Client.3.0.3\lib\netstandard2.0\TwitchLib.Client.dll
161 |
162 |
163 | ..\packages\TwitchLib.Client.Enums.1.1.0\lib\netstandard2.0\TwitchLib.Client.Enums.dll
164 |
165 |
166 | ..\packages\TwitchLib.Client.Models.1.1.0\lib\netstandard2.0\TwitchLib.Client.Models.dll
167 |
168 |
169 | ..\packages\TwitchLib.Communication.1.0.3\lib\netstandard2.0\TwitchLib.Communication.dll
170 |
171 |
172 | ..\packages\TwitchLib.PubSub.3.0.2\lib\netstandard2.0\TwitchLib.PubSub.dll
173 |
174 |
175 |
176 |
177 |
178 |
179 | True
180 | True
181 | Config.settings
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 | SettingsSingleFileGenerator
191 | Config.Designer.cs
192 |
193 |
194 |
195 |
196 | False
197 | Microsoft .NET Framework 4.7.2 %28x86 and x64%29
198 | true
199 |
200 |
201 | False
202 | .NET Framework 3.5 SP1
203 | false
204 |
205 |
206 |
207 |
208 |
209 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
210 |
211 |
212 |
213 |
214 |
215 |
--------------------------------------------------------------------------------
/Sentinel/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace GauPoints
4 | {
5 | class Program
6 | {
7 | static void Main(string[] args)
8 | {
9 | TwitchChatBot bot = new TwitchChatBot();
10 | TelegramBetBot betBot = new TelegramBetBot();
11 |
12 | bot.Connect();
13 | betBot.Messages();
14 |
15 | Console.ReadLine();
16 |
17 | bot.Disconnect();
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/Sentinel/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("GauPoints")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("GauPoints")]
13 | [assembly: AssemblyCopyright("Copyright © 2019")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("fdc15e5e-4712-401e-9e00-04f7badb6420")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Sentinel/TelegramBetBot.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading;
6 | using System.Threading.Tasks;
7 | using Telegram.Bot;
8 | using Telegram.Bot.Args;
9 |
10 | namespace GauPoints
11 | {
12 | class TelegramBetBot
13 | {
14 | static ITelegramBotClient botClient;
15 |
16 | internal void Messages()
17 | {
18 | botClient = new TelegramBotClient("1038255736:AAFv-JZ9Y_pONvhXq63h-brZ2BGH3x5m7a4");
19 |
20 | var me = botClient.GetMeAsync().Result;
21 | Console.WriteLine(
22 | $"Hello, World! I am user {me.Id} and my name is {me.FirstName}."
23 | );
24 |
25 | botClient.OnMessage += Bot_OnMessage;
26 | botClient.StartReceiving();
27 | Thread.Sleep(int.MaxValue);
28 | }
29 |
30 | static async void Bot_OnMessage(object sender, MessageEventArgs e)
31 | {
32 | if (e.Message.Text == null)
33 | {
34 | Console.WriteLine($"Received a text message in chat {e.Message.Chat.Id}.");
35 |
36 | await botClient.SendTextMessageAsync(
37 | chatId: e.Message.Chat,
38 | text: "You said:\n" + e.Message.Text
39 | );
40 | }
41 | if (e.Message.Text.Contains("!bet"))
42 | {
43 | Console.WriteLine($"Received a text message in chat {e.Message.Chat.Id}, and the message is {e.Message.Text}.");
44 | TwitchChatBot.Client_OnMessageSent(e.Message.Text);
45 | }
46 | }
47 |
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/Sentinel/TwitchChatBot.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using TwitchLib.Client.Models;
3 | using TwitchLib.Api;
4 | using TwitchLib.Client;
5 | using TwitchLib.Client.Events;
6 | using TwitchLib.Api.V5.Models.Users;
7 |
8 | namespace GauPoints
9 | {
10 | internal class TwitchChatBot
11 | {
12 | ConnectionCredentials credentials = new ConnectionCredentials(Config.Default.BotUsername, Config.Default.BotToken);
13 | public static TwitchClient client;
14 | TwitchAPI api = new TwitchAPI();
15 | public static string Bet;
16 |
17 | public TwitchChatBot()
18 | {
19 |
20 | }
21 |
22 | internal void Connect()
23 | {
24 | Console.WriteLine("Connecting");
25 | client = new TwitchClient();
26 |
27 | client.Initialize(credentials, Config.Default.ChannelName);
28 | client.OnLog += Client_OnLog;
29 | client.OnConnectionError += Client_OnConnectionError;
30 | // Until here, thats all ok
31 |
32 | //
33 | client.OnMessageReceived += Client_OnMessageReceived;
34 | //
35 |
36 | client.Connect();
37 |
38 | //ClientId = Config.Default.ClientID;
39 |
40 |
41 | }
42 |
43 |
44 | //Não sei qual dos dois está funcionando, mas está funcionando, tenho que dormir.
45 | private void Client_OnMessageReceived(object sender, OnMessageReceivedArgs e)
46 | {
47 | if (e.ChatMessage.Message != null)
48 | {
49 | Console.WriteLine("Working");
50 | }
51 | else if (e.ChatMessage.Message.StartsWith("!bet", StringComparison.InvariantCultureIgnoreCase))
52 | {
53 | client.SendMessage(Config.Default.ChannelName, Bet);
54 | }
55 | }
56 | public static void Client_OnMessageSent(string bet)
57 | {
58 | if (bet.StartsWith("!bet", StringComparison.InvariantCultureIgnoreCase))
59 | {
60 | Console.WriteLine("Bet chegou");
61 | client.SendMessage(Config.Default.ChannelName, $"{bet.ToString()}");
62 | }
63 | }
64 | //
65 |
66 | TimeSpan? GetUpTime()
67 | {
68 | string userId = GetUserId(Config.Default.ChannelName);
69 | if(userId == null)
70 | {
71 | return null;
72 | }
73 |
74 | return api.V5.Streams.GetUptimeAsync(userId).Result;
75 | }
76 |
77 | string GetUserId(string username)
78 | {
79 | User[] userList = api.V5.Users.GetUserByNameAsync(username).Result.Matches;
80 | if(userList == null || userList.Length == 0)
81 | {
82 | return null;
83 | }
84 | return userList[0].Id;
85 | }
86 |
87 | private void Client_OnLog(object sender, OnLogArgs e)
88 | {
89 | Console.WriteLine(e.Data);
90 | }
91 | private void Client_OnConnectionError(object sender, OnConnectionErrorArgs e)
92 | {
93 | Console.WriteLine($"Erro! : {e.Error}");
94 | }
95 |
96 | internal void Disconnect()
97 | {
98 | Console.WriteLine("Disconnecting");
99 | }
100 |
101 |
102 | }
103 | }
--------------------------------------------------------------------------------
/Sentinel/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------