discord.py Joining a server (Rewrite) - discord.py

I am making a Discord SelfBot just to learn/understand more of discord.py, before I start, I do not intend on using this on servers! It is for fun and to learn.
How can I make it so when you run the bot, it makes you join a certain discord server?
I cannot find anything on the internet etc so I do not know really what to do.

The simple fact of connecting to the API using a user token outside the context of discord's official client is expressly forbidden in the ToS. Also, you say you don't want to use it on "servers" yet your question is how to join a server...

Related

From what IP and fingerprint do Reddit bots deployed on Heroku (or equivalent) work?

I'm planning on using bots to moderate my Reddit servers. I own a bunch of them, and some of them have grown pretty rapidly and unexpectedly in a short period of time, so I think it's time I start automating parts of the moderation.
One of the options I'm considering is deploying a python script on Heroku or Dokku, and just leave that runnning.
What I would like to know is what exact location/IP address will reddit see the bot user logged in as. I will be having 5-10 bots, and I want to make sure I am not breaking any rules.
A long time ago I experimented with using selenium bots on Reddit, however Reddit has very strict policy with selenium bots, and all the accounts either got banned or shadowbanned.
I was doing somewhat spammy things with my selenium bots, however I plan on using these bots strictly for moderation purposes, and I'd like to know what precautions I'd need to take to avoid bans/shadowbans.
Also, do I need to use a different Heroku location for each bot? I remember using a multi-fingerprint browser with different proxies for my selenium bots.
Any help would be appreciated,
Thanks!

How to tell when a bot is conected in python?

I'm making a bot for discord in discord.py and giving the compiled executable to friends, so I want to know when the bot is already connected to discord to prevent bugs, I thought to use a server but I don't think it will be usefull for me(because I don't know anything of server stuff xD).
is there any way to detect when the bot is connected without connecting a second instance of it? or any example of connection to a server that I can modify to my use?
please and thank you.
my english is broken btw xD.

Is there a way to connect to Exchange Online using Logic Apps? Do I need to use a REST-api or EWS?

i'm quite new to Logic Apps. I got the task to make an auto reply function within Logic Apps that integrates with Exchange Online. Now I already performed this task using Outlook, but I have to be able to apply it to multiple mailboxes or even the entire company using Exchange. I'm about to get access to the Exchange Admin Center soon, but I don't really know how to start due to the fact that there is no simple way to make a connection to Exchange using Logic Apps. After some research, I think it's necessary for me to somehow make use of a REST API (I also read about the use of Exchange Web Services) to get the information I need, but my knowledge about this is quite small. I guess I'm gonna have to use a program like Postman to request information, so that I can start creating Custom Connectors to Exchange. If anybody has some understanding about this, feel free to reply and help me out! I will forever be gratefull!
There are several different approaches you could take to this if you (or probably they in your case) want your logic app to do all the work then you should use the Graph API rather then EWS (while its possible because its older API you'll loose marks on your assignment) have a look at http://martink.me/articles/using-microsoft-graph-in-logic-apps which covers the basics of what to do. To Get access to mailboxes tenant wide then you need to assigned Application Permission and get certificate (and store that in the KeyVault on Azure etc).
You can do this using Inbox Rules https://learn.microsoft.com/en-us/graph/api/mailfolder-post-messagerules?view=graph-rest-1.0&tabs=http and the Exchange Server will do all the work when it comes to doing the Auto-response (and has loop detection logic already) and your logic app then just need to do the Creation and management of the Rules.
But I would suggest you clarify with the person who assigned you the task whether they want the logic app to do the response (eg using the Graph API) or if its okay for the Exchange Server to do this for then (which should be more reliable).
You can also create Rules via the Exchange Admin Center and you could probably also through in Power Automate into the mix to do Autoresponse's so I'd clarify what they want so you don't waste time building something they don't want.

Chatbot handoff from Messenger to Zendesk

I am developing a customer service chatbot, using Azure's Bot Framework in .NET, using the the Messenger channel. I wanted to know if anyone knows what the best way to handle the handoff to a human on Zendesk (which my platform already uses as its CRM platform). I'm not looking for when to do the handoff, but how to manage what happens next.
What I would love to be able to do would be that so when handoff is needed, a ticket on Zendesk would be created, sending for example a file (the transcript of the conversation so far). Then the agent would be able to solve the customer's problem in that ticket, having a conversation with him, having the bot sending messages back and forth between zendesk and messenger.
I don't know if this has been done before, or if it's at all possible. And I'm free to other solutions to the problem of handling this kind of handoff, without having to create a separate "chat" for the customer service agents to use, like it's explained on the azure documentation.
Thank you for your patience while I researched this. I found this resource that I believe will meet your needs. This functionality is built off of the Bot Framework utilizing .NET (it's also available for Nodejs). There are two available methods to connect a client to an agent.
The first (which should apply to you) aggregates different channels into one allowing an agent to pickup in the same channel where the bot handed off. The second opens a new channel when an agent joins the conversation.
Intermediator Bot
I was able to spin up a bot using this and confirmed the bot was listening for outside traffic.
Hope this helps.
Steve.
One thing that I'm about to try is this:
Bot conversation ends.
Bot service calls an Azure Function, passing the conversation content.
The Azure Function integrates with Trello API, creating an entry on a Kanban board.
So, instead of Trello as I want to do, you can make a call to the Zendesk API.
I'm writing a few articles about developing Azure bots. The next two actually are dealing with these very things. You can find out more here. sign up if you'd like to get notified over the next week or so when the new tutorials are online.
Hope that helps!
Tim

How to make my chat-bot accessible from a web page?

I've got my Node.JS bot builder chatbot all working in the emulator, but I'm not sure how I can get started in allowing my bot to be chatted to by others through the internet, on a web page.
I've seen this article, but this seems to be if we want to host the both through Azure. Additionally, I'm not sure how I'd link the code I made for the bot with this.
This is for a school project for a local company, so I'm fairly sure (and will ask) that they want this to be free to run on their own servers, instead of paying Microsoft.
Can anyone help me understand how this all works?
If you're using MS Botframework & LUIS, you will have to host your webhook somewhere to make it accessible to public. Now, if you do not want to spend a penny for hosting services, I'd like to suggest you one more bot platform dialogflow.com (api.ai) where they have built-in inline editor (Powered by Cloud Functions for Firebase). You will just have to write your code there & say deploy. You won't be charged unless you're using a standard edition.
Now, second thing, if you do not want to do any of these & still want to make it public, you will have to have your own servers & all & expose your IP. Put that computer in the DMZ of your router. That is what it is for. Or, simply forward the needed ports. But here you will have to manage everything on your own like if a server goes down etc. Hope this helps.

Resources