bots

Discord Bot ( using C# ) does not execute the command

最后都变了- 提交于 2019-12-12 02:27:16
问题 I wrote a Discord Bot. It's developed with C#. My command list is filled, the command value receives this list. But the command does not execute the code when calling it. My prefix char is '!' followed by the command. My base class looks this: public class Bot { string token = "#######################"; // my Token CommandService command; // The commands holder EventController eventController = new EventController(); // event class CommandController commandController = new CommandController()

Why isn't SendInput() working?

给你一囗甜甜゛ 提交于 2019-12-12 01:46:15
问题 I want to use the SendInput() function to automate pressing some keys. My code: #include "stdafx.h" #include <iostream> #include <string> #include <Windows.h> using std::cin; using std::cout; using std::string; void presskeys(string s){ INPUT ip; ip.ki.wScan = 0; ip.ki.time = 0; ip.ki.dwExtraInfo = 0; HKL kbl = GetKeyboardLayout(0); for (unsigned int i = 0; i < s.length(); ++i) { ip.type = INPUT_KEYBOARD; char c = s[i]; int vk = VkKeyScanEx((WCHAR)c, kbl); ip.ki.wVk = vk; SendInput(1, &ip,

Discord.js Arguments With Spaces

橙三吉。 提交于 2019-12-11 19:32:56
问题 So I'm trying to create my bot and I want there to be a command which adds information to a sqlite database https://gyazo.com/6961a05dc2d6aeca6683b59f888c2e82 if (command === "addplayer") { message.delete() let [name, crew, rank, weapon, df, talent, profession, other] = args; if(!name) return message.author.send("Name argument is required!"); let id = name.toLowerCase(); if(!crew) {let crew = "Blank";} if(!rank) {let rank = "Blank";} if(!weapon) {let weapon = "Blank";} if(!df) {let df =

Ingtegrating LUIS with c# bot framework - ERROR

喜欢而已 提交于 2019-12-11 19:03:12
问题 I'm trying to integrate Luis.ai to C# bot framework. The code runs but when I send a message to the bot it shows this error: "sorry my bot code is having an issue" When it should reply depending on the entry using the intents, I only have 2 intents "None" and "perfil". This is my log: This is my class Perfil.cs: using Microsoft.Bot.Builder.Dialogs; using Microsoft.Bot.Builder.Luis; using Microsoft.Bot.Builder.Luis.Models; using System; using System.Collections.Generic; using System.Linq;

How to stop discord bot respond to itself/all other bots [Discord Bot in Python 3.6]

爷,独闯天下 提交于 2019-12-11 18:19:41
问题 I am very new to programming and just learning. I figured making a discord bot is a good way to learn and I'm enjoying it, I'm just a little stuck. So my bot is private and there's a running joke in our discord server that whenever a user sends "k" all bots respond with "k". ATM we have Dyno, my friend's private bot and hopefully mine. I got all my code working except because the command and the answer is the same my bot just spams the server with "k" until I shut down the bot, how do I stop

Why is message not defined in my Command?

ⅰ亾dé卋堺 提交于 2019-12-11 17:47:24
问题 So, I have made a help command with my discord bot and it looks much more neat when I send it as an embed message. However, it does take up a lot of space, so I was wondering if I could send it as a DM to the message.author . Here's what I have so far: import discord from discord.ext.commands import Bot from discord.ext import commands Client = discord.Client() bot_prefix = "." bot = commands.Bot(command_prefix=bot_prefix) @bot.event async def on_ready(): print("Bot Online!") print("Name: {}"

Bot Framework V4 Dialog wait for user input without prompting

白昼怎懂夜的黑 提交于 2019-12-11 15:49:51
问题 In Bot Framework V3 there was method Context.Wait() which provided a way how to wait for user input within dialog without necessarily prompting user for input. Typical scenario, is when you reply with HeroCard and you just wait for user's reaction, without sending pushy message like: "Please choose form the options". In V4 I was not able to find to find context.Wait() respectively stepContext wait method, and so implementation of this behavior needed light walk around, provided in answer

How would I program my bot to clear away placeholder writing?

杀马特。学长 韩版系。学妹 提交于 2019-12-11 14:58:32
问题 I'm making a bot to log in to bing.com using plain old windows notepad, and so far, I have this: set wb = createobject("internetexplorer.application") wb.statusbar = false wb.menubar = false wb.toolbar = false wb.visible = true wb.navigate("https://login.live.com/login.srf?wa=wsignin1.0&rpsnv=13&ct=1511575188&rver=6.7.6631.0&wp=MBI&wreply=https%3a%2f%2fwww.bing.com%2fsecure%2fPassport.aspx%3frequrl%3dhttps%253a%252f%252fwww.bing.com%252f%253fwlexpsignin%253d1&lc=1033&id=264960&CSRFToken

SSL Certificate request with cURL

大憨熊 提交于 2019-12-11 12:09:32
问题 I'm writing a betting bot in PHP and the bet house requires a SSL Certificate being sent for automated connections. I've got all kinds of self-signed certificates to use: cert.crt, cert.pem, cert.p12 and also a key cert.key and I'm using curl to establish the login connection however I can't seem to get the curl parameters right for the connection. With the following command line I can establish a successful connection: curl -q -k --cert cert.crt --key cert.key https://api.domain.com

Using UCMA 3.0 to build an OCS IM bot. Where do I start?

青春壹個敷衍的年華 提交于 2019-12-11 08:56:57
问题 I'm looking to create an IM bot for OCS which will provide users with certain pieces of information based on a series of external triggers. We use OCS exclusively in our environment, so building a bot on another platform is most likely out of the question. From my research, I found some documentation from Joe Calev on UCMA, but it's very scattered and I would prefer something I can read offline. Plus, it seems a bit unfriendly for those who've never worked with UCMA before. I can't seem to