bots

How do I filter words with a discord bot? (JavaScript)

末鹿安然 提交于 2019-12-25 19:21:26
问题 I have recently created a bot for my discord server. Now I want him to filter bad words. For example: User (without bot): You are an asshole User (with bot): You are an [I'm stupid because I swear] Is this even possible in Discord? I have given my bot all permissions! (including removing messages, it can't edit message with the program self tho) If that is not possible^ Can we do the following? The ability to directly delete the message and write the following: Bot: @username Do not swear!

Unable to deserialize the response - GetUserDataAsync

人走茶凉 提交于 2019-12-25 17:17:10
问题 I am working bot technology, in one of my project I used bot state concept to get the bot data and set new data here I used state client object like this below //var stateClient = new StateClient(new Uri("http://localhost:9000/")); var stateClient = new StateClient(new Uri("https://skype.botframework.com")); This is code I wrote in LoginController.cs if (stateClient != null) { var getData = await stateClient.BotState.GetUserDataAsync(Constants.Constants.botId, activity.From.Id);// 29:1

!UpTime Twitch command (TwitchBot C#)

六眼飞鱼酱① 提交于 2019-12-25 09:25:58
问题 I was wondering how I would add a command for 'UpTime' in my commands that will show how long the twitch channel has been live for. This is my whole code: https://pastebin.com/ty8J3vYS Im not sure if i add it into my commands with things added to it with another case such as case "uptime": irc.sendChatMessage(""); break; Any help/guidance would be great. Thanks in advanced. 回答1: You can use Twitch's own API for this. Using this URL: https://api.twitch.tv/kraken/streams/CHANNEL_ID CHANNEL_ID

Command Cooldown for a Python Twitch Bot

倾然丶 夕夏残阳落幕 提交于 2019-12-25 09:18:49
问题 I'm making a Twitch Bot using Pthon. I want to create a cooldown on the commands so you can only call the command once every (x) seconds. Eg: Rustie: test Bot: Testing command *Imediately after* Rustie: test *5 seconds later* Rustie: test Bot: Testing command I have tried this code but it doesn't work (Also I want to get rid of time.sleep as during that time I can't use other commands): used = [] if "test" in message: if "test" in used: time.sleep(5) del(used[:]) else: sendMessage(s, "Testing

How do I use client.send_file discord.py

霸气de小男生 提交于 2019-12-25 08:38:54
问题 @my_bot.command() async def memes(): await client.send_file(discord.Object(id='321332957690331138'),'1.jpg') I used that and I got error code 401 aka Unauthorized my_bot.run(TOKEN) I'm using that to login All my other commands work and do not output this error. -I'm quite new to this website so I may have done something wrong- 回答1: Your issue is that you need to pass a proper destination (channel in server) as the first parameter. To get the server object from a server ID you can use: server

IRC Reading Sockets

可紊 提交于 2019-12-25 05:25:19
问题 I am making a bot and have most everything ready except input. I want to have something like this: "!test word" and have it output something like "word2". Here is the code that I am using to output data. I would also like to find out my username (opername). Sorry if the indenting is off on the page; it's just fine on my end. while True: data = irc.recv ( 4096 ) if data.find ('PING' ) != -1: irc.send ('PONG ' + data.split() [ 1 ] + '\r\n' ) if data.find ('!quit') != -1: irc.send ('QUIT\r\n')

How to trade on steam with python [closed]

流过昼夜 提交于 2019-12-25 04:34:36
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . i am currently working on a project that involves TF2,python,and steam trading. I would like to know how i can send a steam trade offer from python. I do not need source code or anything, just point me in the right direction. I have searched for ~20 mins on google and cant find anything quite like what i want,

Why am I getting this error? HTTP Error 407: Proxy Authentication Required

旧巷老猫 提交于 2019-12-25 03:00:33
问题 I am using the following code found on post, How to specify an authenticated proxy for a python http connection? import urllib2 def get_proxy_opener(proxyurl, proxyuser, proxypass, proxyscheme="http"): password_mgr = urllib2.HTTPPasswordMgrWithDefaultRealm() password_mgr.add_password(None, proxyurl, proxyuser, proxypass) proxy_handler = urllib2.ProxyHandler({proxyscheme: proxyurl}) proxy_auth_handler = urllib2.ProxyBasicAuthHandler(password_mgr) return urllib2.build_opener(proxy_handler,

botbuilder-python dialogs and conversation flow

大兔子大兔子 提交于 2019-12-25 02:44:55
问题 I cannot find any docs or examples to create a dialog\waterfall conversations in botbuilder-python. Is it not possible yet? I know it is in preview. Has anyone tried to create bots with it? 回答1: The BotFramework Python SDK is still in Preview, and, unfortunately, does not currently support Waterfall Dialogs. I have heard that the development team might be expanding the Python SDK in the near future, so be sure to check the BotBuilder-Python repo for updates! 来源: https://stackoverflow.com

How do i retrieve data from a JVM renderized into a web page using C# code?

自闭症网瘾萝莉.ら 提交于 2019-12-25 02:19:37
问题 Context: I am trying to write a "bot" to make queries into this site. One of the problems is that, the results are shown into a "frame" that does not appear into the HTML, and it looks to me like a "Java Virtual Machine" or whatever. Problem: The main problem (leaving the captchas recognition aside, since we've done it before) is that i can't find a way to "retrieve/extract" the result data of the query at the website. I've crawled the HTML manually trying to find at least, a clue of what's