![JAR search and dependency download from the Maven repository](/logo.png)
com.ullink.slack.simpleslackapi.impl.SlackChatConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simpleslackapi-lib Show documentation
Show all versions of simpleslackapi-lib Show documentation
A simple API to build bot running on Slack
The newest version!
package com.ullink.slack.simpleslackapi.impl;
public class SlackChatConfiguration
{
static enum Avatar
{
DEFAULT, EMOJI, ICON_URL;
}
protected boolean asUser;
protected Avatar avatar = Avatar.DEFAULT;
protected String userName;
protected String avatarDescription;
private SlackChatConfiguration()
{
}
public SlackChatConfiguration asUser()
{
asUser = true;
avatar = Avatar.DEFAULT;
avatarDescription = null;
return this;
}
public SlackChatConfiguration withIcon(String iconURL)
{
asUser = false;
avatar = Avatar.ICON_URL;
avatarDescription = iconURL;
return this;
}
public SlackChatConfiguration withName(String name)
{
asUser = false;
userName = name;
return this;
}
public SlackChatConfiguration withEmoji(String emoji)
{
asUser = false;
avatar = Avatar.EMOJI;
avatarDescription = emoji;
return this;
}
public static SlackChatConfiguration getConfiguration()
{
return new SlackChatConfiguration();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy