Skip to content

Commit

Permalink
added new slack bot
Browse files Browse the repository at this point in the history
  • Loading branch information
talhayaseen57 committed Mar 17, 2024
1 parent 8573aae commit 1a75efe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

public class SlackBot {

private static final String TOKEN = "xoxb-4459424149986-6799838706535-64GGpN82MwBtkp9rVD3vFJ2n";
private static final String CHANNEL_ID = "C06Q0Q5L1NY";
private static final String TOKEN = "xoxb-6827094040193-6811539192533-TKdZIJGe7AAjpCiD7v8kwPmT";
private static final String CHANNEL_ID = "C06QB2UKQSV";
private static final String SLACK_API_URL = "https://slack.com/api/chat.postMessage";

public static void postMessage(String message) {
Expand All @@ -29,9 +29,6 @@ public static void postMessage(String message) {

int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);

// Handle the connection response...

} catch (Exception e) {
e.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class SlackBotTest {

@Test
public void slack_post_message_test () {
SlackBot.postMessage("Test message 2");
SlackBot.postMessage("Test message 1");
}

}

0 comments on commit 1a75efe

Please sign in to comment.