✏️ Fix typo, missing await and weird code indentation
This commit is contained in:
@@ -16,9 +16,8 @@ export {
|
|||||||
const LOG_PREFIX = "[ChatClient] ";
|
const LOG_PREFIX = "[ChatClient] ";
|
||||||
|
|
||||||
async function connect(channels: Array<any>) {
|
async function connect(channels: Array<any>) {
|
||||||
const authProvider = await getAuthProvider(
|
const authProvider = await getAuthProvider();
|
||||||
|
|
||||||
);
|
|
||||||
if (
|
if (
|
||||||
chatClient &&
|
chatClient &&
|
||||||
(
|
(
|
||||||
@@ -85,8 +84,8 @@ async function handleClientAction(action: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// send a chat message
|
// send a chat message
|
||||||
function say(channel: string, message: string) {
|
async function say(channel: string, message: string) {
|
||||||
chatClient.say(channel, message);
|
await chatClient.say(channel, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
// timeouts a user in a channel
|
// timeouts a user in a channel
|
||||||
|
@@ -27,7 +27,7 @@ async function onRedemption(message: PubSubRedemptionMessage) {
|
|||||||
`${LOG_PREFIX}Reward: "${message.rewardName}" (${message.rewardId}) redeemed by ${message.userDisplayName}`
|
`${LOG_PREFIX}Reward: "${message.rewardName}" (${message.rewardId}) redeemed by ${message.userDisplayName}`
|
||||||
);
|
);
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const reward = message._data.data.redemption.rewºard;
|
const reward = message._data.data.redemption.reward;
|
||||||
|
|
||||||
let msg: any = {
|
let msg: any = {
|
||||||
id: message.id,
|
id: message.id,
|
||||||
|
@@ -93,7 +93,7 @@ async function onRefresh(refreshData: AccessToken): Promise<void> {
|
|||||||
async function getApiClient() {
|
async function getApiClient() {
|
||||||
const authProvider = await getAuthProvider();
|
const authProvider = await getAuthProvider();
|
||||||
|
|
||||||
return new ApiClient({ authProvider });
|
return await new ApiClient({ authProvider });
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getUsernameFromId(userId: number) {
|
async function getUsernameFromId(userId: number) {
|
||||||
|
Reference in New Issue
Block a user