Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to act as a Bot Account #30

Open
kkirsche opened this issue Jan 30, 2020 · 1 comment
Open

Update to act as a Bot Account #30

kkirsche opened this issue Jan 30, 2020 · 1 comment
Labels
Hacktoberfest Help Wanted Community help wanted Type/Enhancement New feature or improvement of existing feature

Comments

@kkirsche
Copy link

It would be great for this to be compatible with the Bot Account structure as discussed on:

https://docs.mattermost.com/developer/bot-accounts.html

As this clearly is described as a sample bot, it is a bit confusing that it doesn't work with bot accounts due to the requirement of logging in.

@hanzei hanzei added Help Wanted Community help wanted Type/Enhancement New feature or improvement of existing feature labels Aug 1, 2020
@chunhunghan
Copy link

If I understand you clearly. You are trying to reply message with Bot.
I have tested with v6/model. it works fine.

Step 1: Use client.SetToken
//LoginAsTheBotUser()
client.SetToken("YOUR_BOT_TOKEN")

Step 2: In HandleMsgFromDebuggingChannel , check botUser

if botUser != nil {
 		if post.UserId == botUser.Id {
 			return
 		}
 	}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest Help Wanted Community help wanted Type/Enhancement New feature or improvement of existing feature
Projects
None yet
Development

No branches or pull requests

5 participants