slackapi / slackapi/python-slack-sdk

Need a method to get the channel ID using the current channel name

Aperta
#1,503 10 commenti 9 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

auto-triage-skip duplicate question server-side-issue
Lingua principale
Python
Stelle
4k
Fork
857
Merge medio
22h 21m
PR unite (30g)
16

Descrizione

We need a way to get the channel ID when provided the current channel name as an input. Previously this could be done using the channels.info API method, but now with that method fully deprecated and disabled, we don't have any other reliable method of doing this. We could theoretically post a new message to the channel using chat.postMessage, which returns the channel ID, then remove that message, but this seems like overkill.

The use case is that a user provides a channel name as input, and we want to convert that channel name to an ID and store that ID for later use when posting messages. Obviously the name may change over time, so using the channel ID is ideal.

Category
  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.models (UI component builders)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.rtm (RTM client)
  • slack_sdk.signature (Request Signature Verifier)

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia dai punti di ingresso sincroni e asincroni di slack_sdk.web.WebClient e esamina i metodi esistenti relativi ai canali. Confronta la ricerca richiesta per nome del canale con channels.info, ormai deprecato, e con il workaround chat.postMessage; il lavoro è completato quando viene esposto un modo affidabile per ottenere e memorizzare l'ID del canale senza pubblicare un messaggio temporaneo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
api
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.