This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"envelope_id":"61b1699c-c2af-47fa-ba05-e1bfc5a0bb3b", | |
"payload":{ | |
"token":"2Ns65jvtOBULYISLdEdinjyg", | |
"team_id":"T02B0KKSX4Z", | |
"api_app_id":"A02BBLA9PEU", | |
"event":{ | |
"client_msg_id":"e64f8121-a4e0-45a9-8f10-670f229bf242", | |
"type":"app_mention", | |
"text":"<@U02AN8BG2E7>", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"os" | |
"time" | |
"github.com/joho/godotenv" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
socketmode: 2021/08/10 08:37:50 socket_mode_managed_conn.go:91: WebSocket connection succeeded on try 0 | |
socketmode: 2021/08/10 08:37:50 socket_mode_managed_conn.go:439: Starting to receive message | |
socketmode: 2021/08/10 08:37:50 socket_mode_managed_conn.go:481: Incoming WebSocket message: { | |
"type": "hello", | |
"num_connections": 1, | |
"debug_info": { | |
"host": "applink-canary-5467cdc868-2w5t7", | |
"build_number": 18, | |
"approximate_connection_time": 18060 | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"os" | |
"time" | |
"github.com/joho/godotenv" | |
"github.com/slack-go/slack" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SLACK_AUTH_TOKEN="Your Bot Token" | |
SLACK_APP_TOKEN="App Level token" | |
SLACK_CHANNEL_ID="ChannelID" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"time" | |
"github.com/joho/godotenv" | |
"github.com/slack-go/slack" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SLACK_AUTH_TOKEN="YourTokenGoesHere" | |
SLACK_CHANNEL_ID="YourSlackChannelID" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NavLink , useHistory} from "react-router-dom"; | |
function Navbar() { | |
let history = useHistory(); | |
function goHome(path) { | |
history.push("/"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useParams, useLocation } from "react-router-dom"; | |
import React from 'react'; | |
const Profile = () => { | |
// Use the useParams hook to get the username from the URL | |
// username has to be applied as a named parameter in the route | |
let { username } = useParams(); | |
// useLocation hook is used to grab the state from the input to object | |
// You can grab each field in the object by using the same name as the variable name |